:root {
    --site-bg: #f8f4ed;
    --stone-900: #1c1917;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-300: #d6d3d1;
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --white: #ffffff;
    --shadow-soft: 0 18px 55px rgba(41, 37, 36, 0.12);
    --shadow-strong: 0 30px 80px rgba(28, 25, 23, 0.28);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #fafaf9 0%, #fffbeb 48%, #e7e5e4 100%);
    color: var(--stone-800);
}

a {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

img {
    width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(28, 25, 23, 0.94);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.nav-bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
    color: white;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.38);
}

.logo-text {
    font-size: 1.2rem;
}

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

.nav-link,
.mobile-link {
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.header-search input {
    width: 210px;
    padding: 0.62rem 0.95rem;
    color: white;
    outline: none;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.header-search button {
    padding: 0.62rem 1rem;
    background: var(--amber-600);
    color: white;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.mobile-nav {
    display: none;
    padding: 0 1rem 1rem;
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.45rem;
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-media,
.hero-media img,
.hero-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media img {
    object-fit: cover;
}

.hero-mask {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
    color: white;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: var(--amber-500);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.eyebrow::before,
.section-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.16);
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.98;
    font-weight: 900;
    text-shadow: 0 16px 45px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
    max-width: 700px;
    margin-top: 1.25rem;
    color: #e7e5e4;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.6rem 0 2rem;
    color: #fef3c7;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.38rem 0.76rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-weight: 800;
}

.btn-primary {
    background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
    color: white;
    box-shadow: 0 16px 35px rgba(217, 119, 6, 0.34);
}

.btn-primary:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 22px 46px rgba(217, 119, 6, 0.45);
}

.btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
    color: white;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: white;
    font-size: 2.2rem;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 5;
    display: flex;
    gap: 0.55rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.25s ease, background-color 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-500);
}

.home-search-block {
    margin-top: -44px;
    position: relative;
    z-index: 10;
}

.search-card-large {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    gap: 1.5rem;
    align-items: center;
    border-radius: 24px;
    padding: 1.6rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
}

.search-card-large h2 {
    font-size: 1.5rem;
    font-weight: 900;
}

.search-card-large p {
    color: var(--stone-600);
}

.home-search-form,
.filter-bar {
    display: flex;
    gap: 0.75rem;
}

.home-search-form input,
.filter-bar input,
.filter-bar select {
    min-height: 48px;
    border-radius: 14px;
    padding: 0 1rem;
    border: 1px solid #e7e5e4;
    background: white;
    color: var(--stone-800);
    outline: none;
}

.home-search-form input,
.filter-bar input {
    flex: 1;
}

.home-search-form button {
    min-height: 48px;
    border-radius: 14px;
    padding: 0 1.25rem;
    background: var(--stone-900);
    color: white;
    font-weight: 800;
}

.section-block {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-head a {
    color: var(--amber-700);
    font-weight: 800;
}

.section-head.compact {
    align-items: center;
    margin-bottom: 1.2rem;
}

.section-title {
    margin: 0;
    color: var(--stone-800);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: white;
    box-shadow: 0 10px 30px rgba(41, 37, 36, 0.08);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 55px rgba(41, 37, 36, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #292524, #92400e);
}

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

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

.poster-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    background: rgba(0, 0, 0, 0.68);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card-body {
    padding: 1rem;
}

.movie-card-body h2 {
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 900;
}

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

.movie-meta,
.movie-line {
    margin-top: 0.45rem;
    color: var(--stone-600);
    font-size: 0.9rem;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-top: 0.75rem;
}

.tag-row span {
    border-radius: 999px;
    padding: 0.24rem 0.55rem;
    background: #fffbeb;
    color: var(--amber-800);
    font-size: 0.76rem;
    font-weight: 700;
}

.tag-row.large span {
    background: rgba(245, 158, 11, 0.18);
    color: #fef3c7;
}

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

.category-card {
    min-height: 150px;
    border-radius: 20px;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.96), rgba(146, 64, 14, 0.92));
    color: white;
    box-shadow: var(--shadow-soft);
}

.category-card:hover {
    transform: translateY(-4px);
    color: white;
    box-shadow: var(--shadow-strong);
}

.category-card span {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 1.25rem;
    font-weight: 900;
}

.category-card p {
    color: #fef3c7;
    font-size: 0.92rem;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 2rem;
}

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

.rank-panel {
    align-self: start;
    position: sticky;
    top: 96px;
    border-radius: 24px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.rank-list {
    display: grid;
    gap: 0.85rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 46px 74px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    border-radius: 16px;
    padding: 0.72rem;
    background: white;
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.07);
}

.rank-list.full .rank-item {
    grid-template-columns: 64px 96px minmax(0, 1fr);
    padding: 1rem;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #292524;
    color: #fbbf24;
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #292524;
}

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

.rank-item h2 {
    font-size: 1rem;
    font-weight: 900;
}

.rank-item p,
.rank-item span {
    display: block;
    margin-top: 0.25rem;
    color: var(--stone-600);
    font-size: 0.88rem;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 4rem;
    background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.36), transparent 34%), linear-gradient(135deg, #1c1917, #292524 55%, #78350f);
    color: white;
}

.page-hero h1 {
    max-width: 860px;
    margin-top: 1rem;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    margin-top: 1rem;
    color: #fef3c7;
    font-size: 1.08rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: #fff;
}

.separator {
    color: rgba(255, 255, 255, 0.38);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 1.2rem;
    border-radius: 22px;
    padding: 1rem;
    background: white;
    box-shadow: var(--shadow-soft);
}

.category-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #292524;
}

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

.category-overview-card h2 {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-overview-card p {
    margin-top: 0.55rem;
    color: var(--stone-600);
}

.mini-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.9rem;
}

.mini-link-row a {
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    background: #fffbeb;
    color: var(--amber-800);
    font-size: 0.8rem;
    font-weight: 700;
}

.filter-bar {
    position: sticky;
    top: 84px;
    z-index: 20;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
    border-radius: 20px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.filter-bar.wide select,
.filter-bar select {
    min-width: 150px;
}

.empty-state {
    display: none;
    border-radius: 18px;
    padding: 2rem;
    background: white;
    color: var(--stone-600);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

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

.detail-hero {
    padding: 4rem 0;
    background: radial-gradient(circle at 75% 15%, rgba(245, 158, 11, 0.28), transparent 32%), linear-gradient(135deg, #1c1917, #292524 56%, #78350f);
    color: white;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 2.3rem;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    background: #292524;
    box-shadow: var(--shadow-strong);
}

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

.detail-copy h1 {
    margin-top: 1rem;
    font-size: clamp(2.1rem, 6vw, 5rem);
    font-weight: 900;
}

.detail-line {
    max-width: 860px;
    margin-top: 1rem;
    color: #e7e5e4;
    font-size: 1.2rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 1.4rem 0;
    color: #fef3c7;
}

.player-section {
    padding-top: 4rem;
}

.player-section h2,
.content-card h2 {
    margin-bottom: 1rem;
    font-size: 1.7rem;
    font-weight: 900;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-strong);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.28));
    color: white;
    font-size: 1.2rem;
    font-weight: 900;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 0.25rem;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.42);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1.25rem;
    padding-top: 2rem;
}

.content-card {
    border-radius: 24px;
    padding: 1.5rem;
    background: white;
    box-shadow: var(--shadow-soft);
}

.content-card p {
    color: var(--stone-700);
    line-height: 1.9;
}

.accent-card {
    background: #fffbeb;
    border-left: 5px solid var(--amber-600);
}

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

.small-card .movie-card-body h2 {
    font-size: 0.96rem;
}

.site-footer {
    margin-top: 4rem;
    padding: 3.5rem 0;
    background: #1c1917;
    color: #d6d3d1;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 2rem;
}

.footer-logo {
    margin-bottom: 1rem;
    color: white;
}

.site-footer h2 {
    margin-bottom: 1rem;
    color: white;
    font-size: 1.05rem;
    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.footer-links a {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fef3c7;
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.16);
    color: white;
}

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

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

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

    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .hero-carousel,
    .hero-content {
        min-height: 560px;
    }

    .search-card-large {
        grid-template-columns: 1fr;
    }

    .home-search-form,
    .filter-bar {
        flex-direction: column;
    }

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

    .category-overview-card,
    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .nav-bar {
        min-height: 64px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero-copy h1,
    .detail-copy h1,
    .page-hero h1 {
        word-break: break-word;
    }

    .hero-arrow {
        display: none;
    }

    .section-block {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

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

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

    .movie-card-body {
        padding: 0.8rem;
    }

    .movie-line {
        display: none;
    }

    .rank-list.full .rank-item,
    .rank-item {
        grid-template-columns: 42px 64px minmax(0, 1fr);
        gap: 0.65rem;
    }

    .page-hero,
    .detail-hero {
        padding: 3.2rem 0;
    }
}
