:root {
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --red: #ef4444;
    --blue: #2563eb;
    --purple: #7c3aed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0, #ffffff 24rem, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

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

button,
input,
select {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--orange), var(--red));
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.22);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--orange);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a {
    font-weight: 700;
    opacity: 0.94;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.search-panel input,
.search-panel select {
    border: 0;
    outline: 0;
    border-radius: 999px;
}

.top-search input,
.mobile-search input {
    width: 210px;
    padding: 10px 15px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.top-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.card-link,
.player-btn {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button {
    padding: 10px 16px;
    color: var(--orange-dark);
    background: #ffffff;
}

.primary-btn,
.card-link,
.player-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.secondary-btn:hover,
.card-link:hover,
.player-btn:hover,
.top-search button:hover,
.mobile-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    padding: 10px;
}

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

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    flex-direction: column;
    gap: 12px;
}

.mobile-panel.is-open {
    display: flex;
}

.hero {
    position: relative;
    min-height: min(86vh, 780px);
    overflow: hidden;
    background: #111827;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 10, 18, 0.85), rgba(7, 10, 18, 0.55), rgba(7, 10, 18, 0.18)), linear-gradient(0deg, rgba(7, 10, 18, 0.68), transparent 50%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(32px, calc((100% - 1240px) / 2));
    top: 50%;
    width: min(720px, calc(100% - 64px));
    transform: translateY(-50%);
    color: #ffffff;
}

.eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.hero-meta span {
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

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

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.content-section,
.detail-section,
.search-panel,
.category-hero,
.ranking-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 56px 0;
}

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

.section-head h1,
.section-head h2,
.category-hero h1,
.ranking-hero h1,
.detail-title h1,
.search-panel h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.section-head p,
.category-hero p,
.ranking-hero p,
.search-panel p,
.detail-title p {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.85;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #f97316, #111827);
}

.card-cover img,
.mini-card img,
.category-tile img,
.detail-cover img,
.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img,
.mini-card:hover img,
.category-tile:hover img,
.related-card:hover img {
    transform: scale(1.06);
}

.card-score {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.74);
    backdrop-filter: blur(12px);
}

.card-body {
    padding: 18px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.card-meta span,
.detail-meta span {
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #9a3412;
    background: #ffedd5;
}

.movie-card h2 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card p {
    min-height: 55px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag-row span {
    padding: 5px 9px;
    color: #374151;
    font-size: 12px;
    background: #f3f4f6;
}

.card-link {
    width: 100%;
    padding: 11px 16px;
}

.horizontal-scroll {
    display: grid;
    grid-auto-columns: minmax(270px, 1fr);
    grid-auto-flow: column;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.horizontal-scroll > * {
    scroll-snap-align: start;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.category-tile strong,
.category-tile span {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
}

.category-tile strong {
    bottom: 52px;
    font-size: 24px;
    font-weight: 950;
}

.category-tile span {
    bottom: 24px;
    color: rgba(255, 255, 255, 0.82);
}

.category-hero,
.ranking-hero,
.search-panel {
    margin-top: 34px;
    margin-bottom: 34px;
    padding: 38px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    gap: 22px;
}

.search-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-controls input,
.search-controls select {
    padding: 14px 18px;
    border: 1px solid var(--line);
    background: #ffffff;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-row button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #374151;
    background: #f3f4f6;
    cursor: pointer;
}

.filter-row button.is-active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.no-results {
    display: none;
    padding: 32px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 24px;
    background: #ffffff;
}

.no-results.is-visible {
    display: block;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 92px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.rank-num {
    color: var(--orange);
    font-size: 30px;
    font-weight: 950;
    text-align: center;
}

.rank-item img {
    width: 92px;
    height: 122px;
    object-fit: cover;
    border-radius: 18px;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 950;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.rank-score {
    padding: 10px 14px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
}

.breadcrumb a,
.breadcrumb span {
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.detail-section {
    padding: 34px 0 64px;
}

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

.detail-main,
.detail-side,
.text-panel {
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.detail-main {
    overflow: hidden;
}

.detail-title {
    padding: 28px;
}

.player-shell {
    position: relative;
    background: #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.55);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.44;
}

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

.play-core {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 18px;
    place-items: center;
    color: #ffffff;
    text-align: center;
}

.play-icon {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.36);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 7px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #ffffff;
}

.player-status {
    min-height: 24px;
    color: #ffffff;
    font-weight: 800;
}

.text-panel {
    margin-top: 24px;
    padding: 28px;
}

.text-panel h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 950;
}

.text-panel p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.9;
}

.detail-side {
    padding: 20px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    background: #111827;
}

.side-list,
.related-grid {
    display: grid;
    gap: 14px;
}

.side-list {
    margin-top: 20px;
}

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

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

.related-card img {
    aspect-ratio: 3 / 4;
}

.related-card span,
.mini-card span,
.mini-card small {
    display: block;
    padding: 0 14px;
}

.related-card span,
.mini-card span {
    padding-top: 12px;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.4;
}

.related-card small,
.mini-card small {
    display: block;
    padding: 6px 14px 14px;
    color: var(--muted);
}

.mini-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    grid-template-rows: auto auto;
    gap: 0 12px;
    align-items: center;
    padding-right: 10px;
}

.mini-card img {
    grid-row: span 2;
    width: 78px;
    height: 104px;
}

.mini-card span,
.mini-card small {
    padding-left: 0;
    padding-right: 0;
}

.hidden-by-filter,
.hidden-by-search {
    display: none !important;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

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

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

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

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

    .nav-shell {
        justify-content: space-between;
    }

    .nav-toggle {
        display: block;
    }

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

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

    .detail-side {
        order: -1;
    }
}

@media (max-width: 760px) {
    .hero {
        min-height: 720px;
    }

    .hero-content {
        left: 18px;
        width: calc(100% - 36px);
    }

    .hero-control {
        display: none;
    }

    .content-section {
        padding: 42px 0;
    }

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

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

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

    .rank-item {
        grid-template-columns: 52px 76px 1fr;
    }

    .rank-score {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .rank-item img {
        width: 76px;
        height: 102px;
    }

    .category-hero,
    .ranking-hero,
    .search-panel,
    .detail-title,
    .text-panel {
        padding: 22px;
        border-radius: 24px;
    }
}
