:root {
    --color-primary: #a67c4a;
    --color-primary-dark: #8a6640;
    --color-primary-soft: #f5f0e8;
    --color-secondary: #0284c7;
    --color-accent: #d97706;
    --color-neutral-50: #fafaf9;
    --color-neutral-100: #f5f5f4;
    --color-neutral-200: #e7e5e4;
    --color-neutral-300: #d6d3d1;
    --color-neutral-500: #78716c;
    --color-neutral-600: #57534e;
    --color-neutral-700: #44403c;
    --color-neutral-800: #292524;
    --color-neutral-900: #1c1917;
    --shadow-soft: 0 10px 30px rgba(28, 25, 23, 0.08);
    --shadow-card: 0 18px 45px rgba(28, 25, 23, 0.12);
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--color-neutral-800);
    background: var(--color-neutral-50);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
}

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-neutral-200);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.site-header__inner {
    width: min(100% - 32px, var(--container));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-neutral-800);
    text-decoration: none;
}

.brand__icon,
.footer-brand span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--color-primary);
    box-shadow: 0 10px 18px rgba(166, 124, 74, 0.26);
    font-size: 14px;
}

.brand__text {
    display: grid;
    line-height: 1.15;
}

.brand__text strong {
    font-size: 20px;
    font-weight: 700;
}

.brand__text small {
    margin-top: 3px;
    color: var(--color-neutral-500);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--color-neutral-700);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--color-primary);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--color-neutral-100);
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    margin: 4px auto;
    display: block;
    border-radius: 99px;
    background: var(--color-neutral-700);
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 12px 0 16px;
    border-top: 1px solid var(--color-neutral-200);
}

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

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

.hero {
    position: relative;
    min-height: 540px;
    height: 70vh;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f0e8 0%, #f0f9ff 52%, #fffbeb 100%);
}

.hero__background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    transform: scale(1.02);
}

.hero__background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.18));
}

.hero__inner {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, var(--container));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
}

.hero__content {
    max-width: 720px;
}

.eyebrow {
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hero h1,
.page-hero h1 {
    margin: 0 0 22px;
    color: var(--color-neutral-900);
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
    margin: 0;
    color: var(--color-neutral-700);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.75;
}

.hero__actions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    color: #fff;
    background: var(--color-primary);
    box-shadow: 0 16px 28px rgba(166, 124, 74, 0.22);
}

.button--primary:hover {
    background: var(--color-primary-dark);
}

.button--ghost {
    color: var(--color-neutral-800);
    border-color: rgba(166, 124, 74, 0.28);
    background: rgba(255, 255, 255, 0.72);
}

.hero-feature {
    width: min(360px, 32vw);
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
}

.hero-feature img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: var(--color-neutral-200);
}

.hero-feature h2 {
    margin: 14px 6px 6px;
    color: var(--color-neutral-900);
    font-size: 20px;
    font-weight: 800;
}

.hero-feature p {
    margin: 0 6px 12px;
    color: var(--color-neutral-600);
    font-size: 14px;
    line-height: 1.6;
}

.hero-rail {
    margin-top: -52px;
    position: relative;
    z-index: 2;
}

.hero-rail__inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.hero-mini-card {
    min-height: 96px;
    padding: 12px;
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 18px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-mini-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.hero-mini-card img {
    width: 84px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--color-neutral-200);
}

.hero-mini-card strong {
    display: block;
    color: var(--color-neutral-900);
    font-size: 14px;
    line-height: 1.35;
}

.hero-mini-card span {
    margin-top: 5px;
    display: block;
    color: var(--color-neutral-500);
    font-size: 12px;
}

.section {
    padding: 72px 0;
}

.section--white {
    background: #fff;
}

.section--soft {
    background: linear-gradient(135deg, #f0f9ff 0%, #faf8f5 100%);
}

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

.section__title h2 {
    margin: 0;
    color: var(--color-neutral-900);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
}

.section__title p {
    margin: 8px 0 0;
    color: var(--color-neutral-600);
    line-height: 1.7;
}

.section__link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.movie-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--color-primary-soft), #f0f9ff);
}

.movie-card--compact .movie-card__media {
    aspect-ratio: 4 / 3;
}

.movie-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(6px);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--color-accent);
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.25);
}

.movie-card__body {
    padding: 18px;
}

.movie-card__meta {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--color-neutral-500);
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--color-neutral-900);
    font-size: 18px;
    line-height: 1.4;
    font-weight: 800;
}

.movie-card h3 a {
    color: inherit;
    text-decoration: none;
}

.movie-card h3 a:hover {
    color: var(--color-primary);
}

.movie-card p {
    min-height: 45px;
    margin: 0;
    color: var(--color-neutral-600);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span,
.detail-tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    font-size: 12px;
    font-weight: 700;
}

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    width: 310px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

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

.category-chip {
    min-height: 68px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 16px;
    color: var(--color-neutral-800);
    background: #fff;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.category-chip span {
    font-weight: 800;
}

.category-chip em {
    color: var(--color-primary);
    font-style: normal;
    font-weight: 800;
}

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

.ranking-item {
    padding: 14px;
    display: grid;
    grid-template-columns: 52px 116px 1fr;
    gap: 16px;
    align-items: center;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.ranking-item__number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--color-primary);
    font-weight: 800;
}

.ranking-item img {
    width: 116px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--color-neutral-200);
}

.ranking-item h3 {
    margin: 0 0 6px;
    color: var(--color-neutral-900);
    font-size: 17px;
    font-weight: 800;
}

.ranking-item p {
    margin: 0;
    color: var(--color-neutral-600);
    font-size: 13px;
    line-height: 1.6;
}

.page-hero {
    padding: 72px 0 52px;
    background: linear-gradient(135deg, #f5f0e8 0%, #f0f9ff 100%);
}

.page-hero__inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.breadcrumb {
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--color-neutral-500);
    font-size: 13px;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.filter-panel {
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--color-neutral-200);
    border-radius: 12px;
    color: var(--color-neutral-800);
    background: var(--color-neutral-50);
    outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: rgba(166, 124, 74, 0.55);
    box-shadow: 0 0 0 4px rgba(166, 124, 74, 0.12);
}

.search-status {
    margin-top: 14px;
    color: var(--color-neutral-600);
    font-size: 14px;
}

.search-results {
    margin-top: 28px;
}

.load-more-wrap {
    margin-top: 30px;
    text-align: center;
}

.detail-hero {
    padding: 42px 0;
    background: linear-gradient(135deg, #1c1917 0%, #292524 42%, #8a6640 100%);
    color: #fff;
}

.detail-hero__grid {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 34px;
    align-items: center;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

.player-overlay__button {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.92);
    font-size: 26px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
}

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

.player-message {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    font-size: 13px;
    backdrop-filter: blur(8px);
}

.detail-info h1 {
    margin: 14px 0 16px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 900;
}

.detail-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.75;
}

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

.detail-meta .meta-pill {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.detail-layout {
    width: min(100% - 32px, var(--container));
    margin: 46px auto 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.detail-panel {
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-panel + .detail-panel {
    margin-top: 22px;
}

.detail-panel h2 {
    margin: 0 0 16px;
    color: var(--color-neutral-900);
    font-size: 24px;
    font-weight: 850;
}

.detail-panel p {
    margin: 0;
    color: var(--color-neutral-700);
    line-height: 1.9;
}

.detail-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.side-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    color: inherit;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.side-card img {
    width: 86px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--color-neutral-200);
}

.side-card strong {
    display: block;
    margin-bottom: 5px;
    color: var(--color-neutral-900);
    font-size: 14px;
    line-height: 1.35;
}

.side-card span {
    color: var(--color-neutral-500);
    font-size: 12px;
}

.site-footer {
    color: var(--color-neutral-300);
    background: var(--color-neutral-900);
}

.site-footer__inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.footer-about p {
    max-width: 520px;
    margin: 14px 0 0;
    color: var(--color-neutral-400);
    line-height: 1.75;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-links h2 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 15px;
}

.footer-links a {
    color: var(--color-neutral-400);
    text-decoration: none;
    font-size: 14px;
}

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

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid var(--color-neutral-800);
    color: var(--color-neutral-500);
    text-align: center;
    font-size: 13px;
}

.cover-missing {
    position: relative;
}

.cover-missing img {
    opacity: 0;
}

.cover-missing::after {
    content: attr(data-cover-title);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--color-primary-dark);
    background: linear-gradient(135deg, #f5f0e8, #f0f9ff);
    text-align: center;
    font-weight: 800;
    line-height: 1.45;
}

@media (max-width: 1080px) {
    .hero__inner,
    .detail-hero__grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-feature {
        display: none;
    }

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        height: auto;
        min-height: 600px;
    }

    .hero__inner {
        padding: 72px 0 96px;
    }

    .hero-rail {
        margin-top: -72px;
    }

    .hero-rail__inner {
        grid-template-columns: 1fr;
    }

    .hero-mini-card:nth-child(n + 4) {
        display: none;
    }

    .section {
        padding: 52px 0;
    }

    .section__head {
        display: block;
    }

    .section__link {
        margin-top: 12px;
        display: inline-flex;
    }

    .movie-grid,
    .movie-grid--four,
    .movie-grid--compact,
    .category-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

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

    .ranking-item {
        grid-template-columns: 42px 92px 1fr;
        gap: 12px;
    }

    .ranking-item img {
        width: 92px;
        height: 64px;
    }

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

    .detail-panel {
        padding: 22px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }
}
