:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --panel: #1c1917;
    --panel-soft: #292524;
    --panel-line: #44403c;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --subtle: #78716c;
    --accent: #d97706;
    --accent-soft: #f59e0b;
    --accent-text: #fcd34d;
    --danger: #ef4444;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --max: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.12), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(180, 83, 9, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(28, 25, 23, 0.92);
    border-bottom: 1px solid rgba(68, 64, 60, 0.85);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: var(--max);
    height: 70px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand__mark,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    color: #111827;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(217, 119, 6, 0.25);
}

.brand__name {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

.desktop-nav a,
.mobile-nav a {
    color: #d6d3d1;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.brand:hover .brand__name {
    color: var(--accent-text);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid rgba(68, 64, 60, 0.9);
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.65);
}

.nav-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select {
    min-width: 150px;
    border: 0;
    outline: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: #292524;
    color: var(--text);
}

.nav-search button,
.mobile-nav button,
.filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.mobile-nav button:hover,
.filter-bar button:hover,
.btn-primary:hover {
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 16px 24px 24px;
    background: #1c1917;
    border-top: 1px solid #44403c;
}

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

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.hero {
    position: relative;
    max-width: var(--max);
    margin: 0 auto;
    padding: 34px 24px 0;
}

.hero-stage {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    border-radius: 0 0 34px 34px;
    background: #1c1917;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.75) 44%, rgba(12, 10, 9, 0.24) 100%),
        linear-gradient(0deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.08) 48%, rgba(12, 10, 9, 0.55));
}

.hero-slide__content {
    position: absolute;
    left: clamp(24px, 7vw, 88px);
    bottom: clamp(72px, 12vw, 140px);
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-text);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 620px;
    margin: 22px 0 0;
    color: #d6d3d1;
    font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-tags span,
.movie-card__tags span,
.tag-cloud a {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(68, 64, 60, 0.82);
    color: #d6d3d1;
    font-size: 12px;
    font-style: normal;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.24);
}

.btn-ghost {
    border: 1px solid rgba(214, 211, 209, 0.28);
    background: rgba(28, 25, 23, 0.55);
    color: #f5f5f4;
}

.btn-ghost:hover {
    border-color: var(--accent-text);
    color: var(--accent-text);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(214, 211, 209, 0.25);
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.45);
    color: white;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-arrow:hover {
    background: var(--accent);
    color: white;
}

.hero-arrow--prev {
    left: 24px;
}

.hero-arrow--next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: clamp(24px, 7vw, 88px);
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(214, 211, 209, 0.32);
    cursor: pointer;
}

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

.hero-panel {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: end;
    margin: -58px auto 0;
    padding: 28px;
    max-width: calc(var(--max) - 88px);
    border: 1px solid rgba(68, 64, 60, 0.9);
    border-radius: var(--radius);
    background: rgba(28, 25, 23, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.hero-panel h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.hero-panel p:not(.eyebrow) {
    margin: 12px 0 0;
    color: var(--muted);
}

.hero-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 12px;
}

.hero-links a,
.category-grid a {
    border-radius: 14px;
    padding: 14px 16px;
    background: #292524;
    color: #f5f5f4;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.hero-links a:hover,
.category-grid a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.section,
.detail-shell {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 24px 0;
}

.section--compact {
    padding-top: 56px;
}

.section--panel {
    margin-top: 72px;
    padding: 42px 24px;
    border-radius: 28px;
    background: rgba(28, 25, 23, 0.72);
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-link {
    color: var(--accent-text);
    font-weight: 800;
}

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(68, 64, 60, 0.62);
    border-radius: 16px;
    background: #292524;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px) scale(1.012);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.32);
}

.movie-card__poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #292524, #1c1917);
}

.movie-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.movie-card:hover .movie-card__image {
    transform: scale(1.08);
    opacity: 0.88;
}

.movie-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 48%);
}

.movie-card__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    font-size: 48px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .movie-card__play {
    opacity: 1;
}

.movie-card__type {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 8px;
    padding: 5px 8px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.movie-card__body {
    display: block;
    padding: 14px;
}

.movie-card__body strong {
    display: -webkit-box;
    min-height: 28px;
    overflow: hidden;
    color: #f5f5f4;
    font-size: 17px;
    line-height: 1.25;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.movie-card__body em {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 7px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    color: var(--subtle);
    font-size: 12px;
}

.movie-card__tags {
    margin-top: 10px;
}

.movie-card--compact {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    background: transparent;
    box-shadow: none;
}

.movie-card--compact .movie-card__poster {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
}

.movie-card--compact .movie-card__body {
    padding: 0;
}

.movie-card--compact .movie-card__tags {
    display: none;
}

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

.category-grid a {
    min-height: 130px;
    display: grid;
    align-content: end;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(68, 64, 60, 0.65)),
        #292524;
}

.category-grid strong {
    display: block;
    font-size: 24px;
}

.category-grid span {
    display: block;
    margin-top: 6px;
    color: #d6d3d1;
}

.page-hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 82px 24px 24px;
}

.page-hero--small {
    min-height: 310px;
    display: grid;
    align-content: end;
    border-radius: 0 0 34px 34px;
    background:
        linear-gradient(135deg, rgba(28, 25, 23, 0.94), rgba(68, 64, 60, 0.45)),
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.22), transparent 24rem);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: #d6d3d1;
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 150px auto;
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid rgba(68, 64, 60, 0.74);
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.74);
}

.empty-state {
    display: none;
    margin: 28px 0;
    padding: 22px;
    border-radius: 16px;
    background: #292524;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 60px 112px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
}

.rank-row__num {
    color: var(--accent-text);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-row__thumb {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16 / 10;
    background: #1c1917;
}

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

.rank-row__main strong,
.rank-row__main em,
.rank-row__main span {
    display: block;
}

.rank-row__main strong {
    font-size: 18px;
}

.rank-row__main em {
    max-width: 740px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row__main span,
.rank-row__score {
    margin-top: 5px;
    color: var(--subtle);
    font-size: 13px;
}

.rank-row__score {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-text);
    font-weight: 800;
}

.detail-shell {
    padding-top: 34px;
}

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

.breadcrumbs a:hover {
    color: var(--accent-text);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
}

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

.player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(68, 64, 60, 0.75);
    border-radius: 18px;
    background: #000;
    box-shadow: var(--shadow);
}

.player__video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    cursor: pointer;
}

.player__center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    color: white;
    font-size: 40px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: background 0.2s ease, opacity 0.2s ease;
}

.player.is-playing .player__center {
    opacity: 0;
    pointer-events: none;
}

.player__center:hover {
    background: var(--accent-soft);
}

.player__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player:hover .player__bar,
.player:focus-within .player__bar {
    opacity: 1;
}

.player__bar button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(68, 64, 60, 0.85);
    color: white;
    cursor: pointer;
}

.player__bar button:hover {
    background: var(--accent);
}

.player__bar span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: #d6d3d1;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player__message {
    position: absolute;
    left: 18px;
    top: 18px;
    max-width: calc(100% - 36px);
    margin: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.74);
    color: #f5f5f4;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.player__message.is-visible {
    opacity: 1;
}

.detail-title {
    margin-top: 30px;
}

.detail-title p:not(.eyebrow) {
    margin: 18px 0 0;
    color: #d6d3d1;
    font-size: 18px;
}

.info-card,
.side-card,
.prose-panel {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid rgba(68, 64, 60, 0.62);
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.84);
}

.info-card h2,
.side-card h2,
.prose-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.info-card p,
.prose-panel p {
    margin: 0 0 18px;
    color: #d6d3d1;
    white-space: pre-wrap;
}

.side-card:first-child {
    margin-top: 0;
}

.side-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.side-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(68, 64, 60, 0.62);
}

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

.side-card dd {
    margin: 0;
    color: #f5f5f4;
    text-align: right;
}

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

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

.footer-grid {
    max-width: var(--max);
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 28px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-grid p,
.footer-grid a {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.footer-grid a:hover {
    color: var(--accent-text);
}

.footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    padding: 22px 24px;
    border-top: 1px solid rgba(68, 64, 60, 0.62);
    color: var(--subtle);
    text-align: center;
    font-size: 14px;
}

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

    .mobile-toggle {
        display: block;
    }

    .nav-search {
        margin-left: auto;
    }

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

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

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

    .hero-stage {
        min-height: 560px;
        border-radius: 0 0 24px 24px;
    }

    .hero-panel,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        margin-top: 18px;
        max-width: none;
    }

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

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

    .rank-row {
        grid-template-columns: 44px 86px minmax(0, 1fr);
    }

    .rank-row__score {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .nav-shell,
    .hero,
    .section,
    .detail-shell,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand__name {
        font-size: 18px;
    }

    .hero-stage {
        min-height: 520px;
    }

    .hero-slide__content {
        left: 22px;
        right: 22px;
        bottom: 82px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-dots {
        left: 22px;
    }

    .hero-links,
    .grid--cards,
    .grid--featured,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .movie-card__body strong {
        font-size: 15px;
    }

    .movie-card__body em {
        font-size: 12px;
    }

    .player__center {
        width: 68px;
        height: 68px;
        font-size: 32px;
    }

    .rank-row {
        grid-template-columns: 34px 72px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .rank-row__main strong {
        font-size: 15px;
    }

    .rank-row__main em {
        white-space: normal;
    }
}
