:root {
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-300: #d6d3d1;
    --stone-100: #f5f5f4;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --page-bg: #fafaf9;
    --card-bg: #ffffff;
    --shadow-soft: 0 18px 40px rgba(12, 10, 9, 0.12);
    --shadow-strong: 0 25px 70px rgba(12, 10, 9, 0.32);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--stone-900);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(28, 25, 23, 0.96);
    color: var(--stone-100);
    border-bottom: 1px solid rgba(120, 113, 108, 0.26);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon,
.footer-logo span {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: var(--stone-900);
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.brand-text small {
    color: var(--stone-300);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.nav-link,
.mobile-link {
    color: var(--stone-300);
    font-size: 15px;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
    color: var(--amber-400);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--stone-800);
    color: var(--stone-100);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    border-top: 1px solid rgba(120, 113, 108, 0.26);
}

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

.hero {
    position: relative;
    min-height: 90vh;
    overflow: hidden;
    background: var(--stone-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 10, 9, 0.18) 0%, rgba(12, 10, 9, 0.55) 48%, rgba(12, 10, 9, 0.96) 100%);
}

.hero-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 72px;
    color: white;
}

.hero-content h1,
.hero-content h2 {
    max-width: 860px;
    margin: 16px 0;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--stone-300);
    font-size: clamp(16px, 2.2vw, 20px);
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--stone-950);
    background: var(--amber-500);
    font-size: 14px;
    font-weight: 800;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    color: var(--stone-300);
}

.hero-meta span,
.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(28, 25, 23, 0.72);
    color: var(--stone-100);
    font-size: 13px;
}

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

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

.btn-primary {
    color: var(--stone-950);
    background: var(--amber-500);
}

.btn-primary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

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

.btn-ghost {
    color: white;
    border: 1px solid rgba(245, 245, 244, 0.24);
    background: rgba(28, 25, 23, 0.44);
}

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

.hero-dots button {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(245, 245, 244, 0.34);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--amber-500);
}

.main-section,
.page-hero,
.detail-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p {
    margin: 0;
    color: var(--stone-600);
}

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

.movie-card {
    overflow: hidden;
    background: var(--card-bg);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(12, 10, 9, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--stone-900);
}

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

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

.play-badge,
.year-badge {
    position: absolute;
    display: inline-grid;
    place-items: center;
    color: white;
    background: rgba(12, 10, 9, 0.7);
    backdrop-filter: blur(8px);
}

.play-badge {
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--amber-400);
}

.year-badge {
    right: 12px;
    top: 12px;
    min-width: 54px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
}

.movie-info {
    padding: 18px;
}

.movie-title {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

.movie-title:hover {
    color: var(--amber-600);
}

.movie-info p {
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--stone-600);
    font-size: 14px;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--stone-500);
    font-size: 13px;
}

.meta-row a {
    color: var(--amber-600);
    font-weight: 700;
}

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

.tag-row span {
    background: var(--stone-100);
    color: var(--stone-700);
}

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

.category-tile {
    min-height: 160px;
    padding: 24px;
    border-radius: 22px;
    color: white;
    background: radial-gradient(circle at 25% 20%, rgba(251, 191, 36, 0.45), transparent 32%), linear-gradient(135deg, var(--stone-900), var(--stone-700));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--stone-300);
    font-size: 14px;
}

.page-hero {
    padding: 66px 0 30px;
}

.page-hero.dark {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 72px max(16px, calc((100% - 1280px) / 2)) 48px;
    color: white;
    background: radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.35), transparent 32%), linear-gradient(135deg, var(--stone-950), var(--stone-800));
}

.page-hero.dark p {
    color: var(--stone-300);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin: 22px 0 30px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(120, 113, 108, 0.26);
    border-radius: 14px;
    color: var(--stone-900);
    background: white;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.ranking-layout,
.detail-layout {
    display: grid;
    grid-template-columns: 1.75fr 0.85fr;
    gap: 28px;
}

.ranking-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 54px 92px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 24px rgba(12, 10, 9, 0.06);
}

.rank-num {
    color: var(--amber-600);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.ranking-item img,
.mini-card img {
    width: 92px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy strong,
.mini-card strong {
    display: block;
    color: var(--stone-900);
    font-weight: 800;
}

.rank-copy em,
.mini-card em {
    display: block;
    color: var(--stone-500);
    font-size: 13px;
    font-style: normal;
}

.side-panel {
    padding: 24px;
    border-radius: 22px;
    background: var(--stone-900);
    color: white;
    box-shadow: var(--shadow-soft);
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.mini-card strong {
    color: white;
}

.detail-shell {
    padding: 40px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--stone-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-600);
    font-weight: 700;
}

.player-shell {
    overflow: hidden;
    border-radius: 24px;
    background: var(--stone-950);
    box-shadow: var(--shadow-strong);
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.play-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.play-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.68));
}

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

.play-cover button {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    color: var(--stone-950);
    background: var(--amber-500);
    font-size: 34px;
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.42);
    cursor: pointer;
}

.detail-copy {
    padding: 28px 0 0;
}

.detail-copy p {
    color: var(--stone-700);
    font-size: 16px;
}

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

.detail-meta .meta-pill {
    background: var(--stone-900);
}

.content-card {
    margin-top: 24px;
    padding: 24px;
    border-radius: 22px;
    background: white;
    box-shadow: 0 8px 24px rgba(12, 10, 9, 0.06);
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
}

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

.no-results {
    display: none;
    margin: 30px 0;
    padding: 24px;
    border-radius: 18px;
    color: var(--stone-600);
    background: white;
}

.has-no-results .no-results {
    display: block;
}

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

.site-footer {
    margin-top: 80px;
    padding: 48px 0 28px;
    color: var(--stone-300);
    background: var(--stone-950);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: white;
}

.footer-brand p {
    max-width: 560px;
    margin: 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 18px;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(120, 113, 108, 0.26);
    text-align: center;
    font-size: 14px;
}

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

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

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

@media (max-width: 820px) {
    .hero-content {
        padding-bottom: 76px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: clamp(34px, 12vw, 56px);
    }

    .section-head,
    .ranking-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

@media (max-width: 560px) {
    .nav-wrap {
        width: min(100% - 22px, 1280px);
    }

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

    .brand-icon,
    .footer-logo span {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .hero {
        min-height: 82vh;
    }

    .hero-content,
    .main-section,
    .page-hero,
    .detail-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

    .movie-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item a {
        grid-template-columns: 44px 82px 1fr;
        gap: 10px;
    }

    .ranking-item img,
    .mini-card img {
        width: 82px;
        height: 56px;
    }
}
