:root {
    --bg: #f7f7f6;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --panel: #ffffff;
    --stone: #0c0a09;
    --bronze: #a18072;
    --bronze-light: #d2bab0;
    --bronze-soft: #f2e8e5;
    --shadow: 0 22px 60px rgba(28, 25, 23, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(28, 25, 23, 0.96);
    color: #f5f5f4;
    box-shadow: 0 16px 40px rgba(12, 10, 9, 0.24);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--bronze-light), var(--bronze));
    color: var(--stone);
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 12px 25px rgba(0, 0, 0, 0.28);
}

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

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.brand-copy em {
    color: #a8a29e;
    font-size: 12px;
    font-style: normal;
    margin-top: 4px;
}

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

.nav-link,
.mobile-nav-link {
    color: #d6d3d1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--bronze-light);
}

.header-search {
    width: 245px;
}

.header-search input,
.mobile-nav input,
.control-panel input,
.control-panel select {
    width: 100%;
    border: 1px solid rgba(214, 211, 209, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    outline: none;
    padding: 11px 16px;
}

.header-search input::placeholder,
.mobile-nav input::placeholder {
    color: #a8a29e;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(214, 211, 209, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: #f5f5f4;
    margin: 5px 0;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(214, 211, 209, 0.12);
}

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

.mobile-nav-inner {
    display: grid;
    gap: 14px;
    padding: 16px 0 20px;
}

.search-layer {
    display: none;
    background: rgba(12, 10, 9, 0.98);
    border-top: 1px solid rgba(214, 211, 209, 0.12);
}

.search-layer.is-open {
    display: block;
}

.search-results {
    padding: 18px 0 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px;
}

.search-result-card img {
    width: 70px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.search-result-card strong {
    display: block;
    color: #ffffff;
    line-height: 1.35;
}

.search-result-card span {
    display: block;
    color: #a8a29e;
    font-size: 13px;
    margin-top: 4px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #0c0a09;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 10, 9, 0.95) 0%, rgba(12, 10, 9, 0.62) 45%, rgba(12, 10, 9, 0.18) 100%), linear-gradient(0deg, rgba(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.15) 62%, rgba(12, 10, 9, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 96px 0 86px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--bronze-light);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 14px;
}

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

.hero-desc {
    max-width: 680px;
    color: #e7e5e4;
    font-size: clamp(17px, 2.2vw, 22px);
    margin: 22px 0 0;
}

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

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

.hero-tags span,
.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(210, 186, 176, 0.16);
    color: var(--bronze-light);
    padding: 6px 11px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: var(--bronze);
    color: #ffffff;
    padding: 13px 24px;
    box-shadow: 0 16px 32px rgba(161, 128, 114, 0.34);
}

.primary-btn:hover,
.small-btn:hover {
    transform: translateY(-2px);
    background: #977669;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.06);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.13);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.46);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

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

.main-section {
    padding: 64px 0;
}

.main-section.alt {
    background: #ffffff;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--bronze);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-head h1,
.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 720px;
}

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

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

.movie-card {
    background: var(--panel);
    border: 1px solid rgba(231, 229, 228, 0.95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(28, 25, 23, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(161, 128, 114, 0.42);
    box-shadow: var(--shadow);
}

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

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

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

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.75);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--bronze);
    color: #ffffff;
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

.card-body h2,
.card-body h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
    color: var(--bronze);
}

.card-meta {
    color: var(--muted);
    margin: 8px 0 0;
    font-size: 14px;
}

.card-desc {
    color: #57534e;
    margin: 10px 0 14px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #1c1917, #292524);
    color: #ffffff;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(28, 25, 23, 0.16);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -50px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(210, 186, 176, 0.16);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 12px 0 22px;
    color: #d6d3d1;
}

.category-card span {
    position: relative;
    z-index: 1;
    color: var(--bronze-light);
    font-weight: 800;
}

.page-hero {
    background: radial-gradient(circle at top right, rgba(210, 186, 176, 0.24), transparent 38%), linear-gradient(135deg, #1c1917, #0c0a09);
    color: #ffffff;
    padding: 78px 0 64px;
}

.page-hero p {
    color: #d6d3d1;
}

.control-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 220px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(28, 25, 23, 0.06);
}

.control-panel input,
.control-panel select {
    color: var(--ink);
    background: #f5f5f4;
    border-color: var(--line);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px 120px 1fr auto;
    gap: 18px;
    align-items: center;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    padding: 14px 18px;
    box-shadow: 0 12px 30px rgba(28, 25, 23, 0.06);
}

.ranking-number {
    font-size: 30px;
    font-weight: 900;
    color: var(--bronze);
}

.ranking-item img {
    width: 120px;
    height: 78px;
    object-fit: cover;
    border-radius: 16px;
}

.ranking-item h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.ranking-item p {
    margin: 0;
    color: var(--muted);
}

.small-btn {
    background: var(--bronze);
    color: #ffffff;
    padding: 10px 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #a8a29e;
    margin-bottom: 22px;
}

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

.detail-hero {
    background: linear-gradient(135deg, #0c0a09, #1c1917);
    color: #ffffff;
    padding: 42px 0 64px;
}

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

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    background: #292524;
}

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

.detail-title h1 {
    color: #ffffff;
}

.detail-title .lead {
    font-size: 19px;
    color: #e7e5e4;
    margin: 18px 0 0;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 26px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #0c0a09;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(12, 10, 9, 0.76), rgba(12, 10, 9, 0.32));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--bronze);
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 50px rgba(161, 128, 114, 0.38);
}

.detail-content {
    display: grid;
    gap: 26px;
    padding-top: 40px;
}

.content-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 28px;
    box-shadow: 0 14px 40px rgba(28, 25, 23, 0.07);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

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

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

.related-card {
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
}

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

.related-card h3 {
    font-size: 15px;
    line-height: 1.35;
    padding: 12px;
    margin: 0;
}

.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.prev-next a {
    flex: 1;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    padding: 18px;
    color: var(--bronze);
    font-weight: 800;
}

.site-footer {
    margin-top: 72px;
    background: #1c1917;
    color: #d6d3d1;
    padding: 56px 0 28px;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-grid p {
    margin: 0;
    max-width: 520px;
}

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

.footer-links.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(214, 211, 209, 0.12);
    margin-top: 42px;
    padding-top: 22px;
    color: #a8a29e;
}

.hidden-card {
    display: none !important;
}

@media (max-width: 1100px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .detail-grid {
        grid-template-columns: 320px minmax(0, 1fr);
    }
}

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

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

    .header-inner {
        min-height: 68px;
    }

    .hero,
    .hero-content {
        min-height: 68vh;
    }

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

    .hero-control {
        display: none;
    }

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

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .related-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .control-panel {
        grid-template-columns: 1fr;
    }

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

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

    .ranking-item {
        grid-template-columns: 46px 86px 1fr;
    }

    .ranking-item img {
        width: 86px;
        height: 66px;
    }

    .ranking-item .small-btn {
        grid-column: 2 / 4;
        width: fit-content;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .site-container {
        width: min(100% - 24px, 1180px);
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy em {
        display: none;
    }

    .hero-content {
        padding: 80px 0 70px;
    }

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

    .hero-desc {
        font-size: 16px;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .related-strip,
    .search-results {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 40px 1fr;
    }

    .ranking-item img {
        grid-column: 1 / 3;
        width: 100%;
        height: 170px;
    }

    .ranking-item .small-btn {
        grid-column: 1 / 3;
    }

    .prev-next {
        flex-direction: column;
    }
}
