html {
    scroll-behavior: smooth;
}

body.site-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, .18), transparent 28rem),
        linear-gradient(180deg, #fff7ed 0%, #fffbeb 42%, #ffffff 100%);
    color: #111827;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(251, 146, 60, .18);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #111827;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 24px rgba(249, 115, 22, .28);
    font-size: 16px;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    font-weight: 600;
}

.main-nav a {
    color: #374151;
    transition: color .2s ease, transform .2s ease;
}

.main-nav a:hover {
    color: #f97316;
    transform: translateY(-1px);
}

.nav-subline {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    font-size: 13px;
    color: #6b7280;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #f97316;
}

.hero {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.hero-track {
    min-height: 650px;
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, .55fr);
    align-items: center;
    gap: 56px;
    padding: 86px max(32px, calc((100vw - 1180px) / 2)) 130px;
    background-position: center;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity .7s ease, transform 1.1s ease;
}

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

.hero-copy {
    color: #ffffff;
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fed7aa;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -.06em;
}

.hero p {
    margin: 0 0 32px;
    color: #ffedd5;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
}

.hero-actions,
.page-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn,
.page-links a,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 16px 30px rgba(249, 115, 22, .32);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(10px);
}

.btn:hover,
.page-links a:hover,
.text-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .16);
}

.hero-poster {
    position: relative;
    display: block;
    max-width: 380px;
    justify-self: end;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
    transform: rotate(1.4deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, .92);
    font-weight: 800;
}

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

.hero-dots button {
    width: 36px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .36);
    transition: width .2s ease, background .2s ease;
}

.hero-dots button.active {
    width: 58px;
    background: #ffffff;
}

.hero-quick {
    position: relative;
    z-index: 3;
    margin-top: -70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}

.quick-search form,
.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 12px;
    align-items: center;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    background: #fff7ed;
    color: #111827;
    padding: 0 16px;
    outline: none;
}

.quick-search button,
.filter-bar button {
    min-height: 48px;
    border-radius: 16px;
    padding: 0 18px;
    background: #111827;
    color: #ffffff;
    font-weight: 800;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.hero-chips a,
.category-tile,
.tag-list span {
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.hero-chips a {
    padding: 10px 14px;
    font-weight: 800;
}

.home-intro,
.section-block,
.category-preview {
    padding-top: 64px;
    padding-bottom: 64px;
}

.home-intro {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
}

.home-intro h2,
.section-heading h2,
.rank-layout h2,
.page-hero h1,
.detail-copy h1,
.player-section h2,
.content-card h2,
.rank-side h2 {
    color: #111827;
    font-weight: 900;
    letter-spacing: -.04em;
}

.home-intro h2,
.section-heading h2,
.rank-layout h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.home-intro p,
.section-heading p,
.rank-layout p,
.page-hero p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.7;
}

.text-link,
.section-heading a {
    color: #f97316;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

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

.category-tile {
    display: block;
    padding: 18px;
    min-height: 150px;
    border-radius: 24px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 19px;
}

.category-tile span {
    color: #6b7280;
    line-height: 1.6;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: #fb923c;
    box-shadow: 0 18px 40px rgba(249, 115, 22, .18);
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(251, 146, 60, .18);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.movie-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #111827;
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 3 / 4.2;
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .76));
}

.poster-meta {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.poster-meta span,
.rank-badge {
    color: #ffffff;
    border-radius: 999px;
    background: rgba(17, 24, 39, .82);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

.rank-section {
    padding: 72px 0;
    background: linear-gradient(135deg, #111827, #7c2d12);
    color: #ffffff;
}

.rank-layout {
    display: grid;
    grid-template-columns: .7fr 1.3fr;
    gap: 40px;
    align-items: start;
}

.rank-layout h2,
.rank-layout p {
    color: #ffffff;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 82px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    color: #111827;
    transition: transform .2s ease, box-shadow .2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
}

.rank-index {
    color: #f97316;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 82px;
    height: 62px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-row h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 900;
}

.rank-row p {
    margin: 0 0 4px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.45;
}

.rank-row span {
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
}

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

.page-hero {
    padding: 82px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 10%, rgba(251, 146, 60, .36), transparent 24rem),
        linear-gradient(135deg, #111827, #7c2d12 72%, #f97316);
}

.compact-hero {
    padding: 72px 0;
}

.page-hero h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(36px, 5vw, 62px);
}

.page-hero p {
    max-width: 760px;
    color: #ffedd5;
}

.page-links a {
    margin-top: 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .26);
}

.filter-bar {
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(251, 146, 60, .18);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.empty-result {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 18px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 800;
}

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

.category-card-wide {
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(251, 146, 60, .18);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .08);
}

.category-card-wide h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 26px;
    font-weight: 900;
}

.category-card-wide p {
    margin-bottom: 14px;
    color: #6b7280;
    line-height: 1.7;
}

.category-card-wide ul {
    display: grid;
    gap: 8px;
    color: #c2410c;
    font-weight: 700;
}

.rank-page-grid {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 32px;
}

.full-rank .rank-row {
    grid-template-columns: 56px 94px 1fr;
    background: #ffffff;
}

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

.detail-hero {
    padding: 54px 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(249, 115, 22, .2), transparent 22rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .16);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: #f97316;
    font-weight: 800;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
}

.lead {
    margin-bottom: 22px;
    color: #4b5563;
    font-size: 20px;
    line-height: 1.7;
}

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

.meta-grid div {
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #fed7aa;
}

.meta-grid dt {
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.meta-grid dd {
    margin: 4px 0 0;
    color: #111827;
    font-weight: 900;
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section,
.detail-content {
    padding-top: 54px;
}

.player-section h2 {
    margin-bottom: 18px;
    font-size: clamp(26px, 3vw, 38px);
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .22);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .62));
    font-size: 18px;
    font-weight: 900;
    transition: opacity .2s ease, visibility .2s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 18px 36px rgba(249, 115, 22, .34);
    font-size: 30px;
}

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

.content-card {
    padding: 26px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(251, 146, 60, .18);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .08);
}

.content-card h2 {
    margin-bottom: 12px;
    font-size: 26px;
}

.content-card p {
    color: #4b5563;
    line-height: 1.9;
    font-size: 16px;
}

.site-footer {
    margin-top: 76px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr .7fr 1fr;
    gap: 32px;
    padding: 54px 0;
}

.site-footer h2,
.site-footer h3 {
    margin-bottom: 14px;
    color: #ffffff;
    font-weight: 900;
}

.site-footer p,
.site-footer li {
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer a:hover {
    color: #fb923c;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 18px;
    color: #9ca3af;
    text-align: center;
}

[data-search-card].is-hidden {
    display: none;
}

@media (max-width: 1024px) {
    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 760px;
        padding-top: 70px;
    }

    .hero-poster {
        justify-self: start;
        max-width: 260px;
    }

    .hero-quick,
    .rank-layout,
    .rank-page-grid,
    .detail-layout,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .brand {
        font-size: 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 18px;
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
        justify-content: flex-start;
    }

    .main-nav.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-subline {
        justify-content: flex-start;
    }

    .hero-track {
        min-height: 780px;
    }

    .hero-slide {
        padding-left: 18px;
        padding-right: 18px;
        padding-bottom: 150px;
    }

    .hero-quick {
        margin-top: -86px;
    }

    .quick-search form,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .home-intro,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-strip,
    .movie-grid,
    .small-grid,
    .catalog-grid,
    .featured-grid,
    .category-overview-grid,
    .side-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .category-strip,
    .movie-grid,
    .small-grid,
    .catalog-grid,
    .featured-grid,
    .category-overview-grid,
    .footer-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

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

    .hero p,
    .lead {
        font-size: 17px;
    }

    .rank-row {
        grid-template-columns: 36px 72px 1fr;
    }

    .rank-row img {
        width: 72px;
        height: 58px;
    }
}
