:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --orange: #f97316;
    --amber: #f59e0b;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 30vw),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.13), transparent 34vw),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

img {
    background: rgba(15, 23, 42, 0.45);
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

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

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

.site-logo span:last-child,
.footer-logo span:last-child {
    font-size: 1.25rem;
    background: linear-gradient(90deg, #fb923c, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    color: #fff;
    box-shadow: 0 0 28px rgba(249, 115, 22, 0.42);
}

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

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    color: var(--muted);
    font-size: 0.94rem;
    transition: color 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: #fdba74;
}

.header-search,
.mobile-search,
.wide-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-search input {
    width: 230px;
    padding: 10px 16px;
}

.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    padding: 13px 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(251, 146, 60, 0.72);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
    background: rgba(15, 23, 42, 0.94);
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-button,
.ghost-button,
.section-more {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.26);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.34);
    filter: brightness(1.06);
}

.ghost-button {
    background: rgba(15, 23, 42, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

.mobile-menu-button {
    display: none;
    color: #fff;
    font-size: 1.55rem;
    border: 0;
    background: transparent;
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    gap: 14px;
}

.mobile-search {
    margin-top: 16px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 540px;
    overflow: hidden;
    isolation: isolate;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.58) 44%, rgba(2, 6, 23, 0.14) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.42) 48%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1280px) / 2));
    bottom: 72px;
    width: min(720px, calc(100% - 64px));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fdba74;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    font-size: clamp(2.5rem, 6vw, 5.8rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.055em;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.44);
}

.hero-content p {
    margin-top: 22px;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.28rem);
    line-height: 1.8;
    max-width: 680px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 6px 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(10px);
    font-size: 0.86rem;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.hero-dots {
    position: absolute;
    right: max(32px, calc((100vw - 1280px) / 2));
    bottom: 44px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.45);
    transition: width 220ms ease, background 220ms ease;
}

.hero-dot.is-active {
    width: 36px;
    background: #fb923c;
}

.quick-search-panel,
.page-shell,
.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-panel {
    margin-top: -58px;
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-heading h2,
.text-panel h2,
.player-title-row h2,
.category-card-large h2 {
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.quick-search-panel h2,
.section-heading h2 {
    font-size: clamp(1.55rem, 3vw, 2.5rem);
}

.quick-search-panel p,
.section-heading p,
.page-hero p,
.category-card-large p,
.text-panel p,
.movie-card-body p,
.detail-one-line {
    color: var(--muted);
    line-height: 1.8;
}

.wide-search input {
    min-width: 0;
    flex: 1;
}

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

.no-top-padding {
    padding-top: 24px;
}

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

.section-more {
    white-space: nowrap;
    padding: 10px 16px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.32);
    color: #fed7aa;
    box-shadow: none;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card-link:hover {
    transform: translateY(-7px);
    border-color: rgba(251, 146, 60, 0.42);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

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

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 320ms ease, filter 320ms ease;
}

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

.poster-wrap::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    color: #fff;
}

.rank-badge {
    top: 12px;
    left: 12px;
    padding: 7px 10px;
    color: #fff7ed;
    background: rgba(2, 6, 23, 0.68);
    border: 1px solid rgba(251, 146, 60, 0.48);
    backdrop-filter: blur(10px);
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3 {
    font-size: 1.08rem;
    font-weight: 900;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.movie-meta {
    margin-top: 10px;
    gap: 7px;
}

.movie-meta span {
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.movie-card-body p {
    margin-top: 12px;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(249, 115, 22, 0.12);
    color: #fdba74;
    font-size: 0.76rem;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 280ms ease;
}

.category-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
}

.category-tile p {
    margin-top: 8px;
    color: #cbd5e1;
    font-size: 0.86rem;
    line-height: 1.7;
}

.page-shell {
    padding: 46px 0 74px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 8px);
    padding: clamp(34px, 6vw, 76px);
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.20), transparent 38%),
        linear-gradient(110deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.compact-hero h1,
.category-hero h1 {
    font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.page-hero p {
    margin-top: 18px;
    max-width: 760px;
    font-size: 1.06rem;
}

.inline-search {
    max-width: 620px;
    margin-top: 28px;
}

.filter-bar {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(18px);
}

.filter-bar input {
    flex: 1;
    min-width: 0;
}

.filter-bar select {
    width: 190px;
}

.category-list-large {
    display: grid;
    gap: 24px;
    margin-top: 32px;
}

.category-card-large {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-cover {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 10;
}

.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.category-card-large:hover .category-cover img {
    transform: scale(1.06);
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.inline-links a {
    color: #fed7aa;
    border: 1px solid rgba(249, 115, 22, 0.26);
    background: rgba(249, 115, 22, 0.10);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.86rem;
}

.detail-page {
    padding-bottom: 74px;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    isolation: isolate;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
    filter: blur(2px);
}

.detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.92)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.46) 55%, rgba(2, 6, 23, 0.66) 100%);
}

.detail-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 38px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fed7aa;
}

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

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    background: #0f172a;
}

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

.detail-info h1 {
    font-size: clamp(2.25rem, 5vw, 5rem);
}

.detail-one-line {
    max-width: 850px;
    margin-top: 22px;
    font-size: 1.12rem;
}

.detail-meta {
    margin-top: 24px;
}

.detail-tags {
    margin-top: 18px;
}

.jump-player {
    margin-top: 28px;
}

.player-section {
    width: min(1280px, calc(100% - 32px));
    margin: -110px auto 0;
    position: relative;
    z-index: 5;
}

.player-shell {
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.86);
    box-shadow: var(--shadow);
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.16), rgba(2, 6, 23, 0.36) 46%, rgba(2, 6, 23, 0.62));
    cursor: pointer;
    z-index: 3;
}

.player-cover.hidden {
    display: none;
}

.player-start {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 7px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 0 0 14px rgba(249, 115, 22, 0.12), 0 26px 60px rgba(0, 0, 0, 0.44);
    font-size: 2rem;
}

.player-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
}

.player-title-row h2 {
    font-size: 1.35rem;
}

.player-title-row span {
    color: var(--soft);
}

.detail-content {
    padding-top: 42px;
}

.text-panel {
    margin-bottom: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
}

.text-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 14px;
}

.text-panel p {
    font-size: 1.02rem;
}

.search-page-form {
    margin-top: 28px;
    max-width: 760px;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.96));
}

.footer-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-shell p {
    max-width: 560px;
    margin-top: 14px;
    color: var(--soft);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-end;
    gap: 14px 20px;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 0.92rem;
    text-align: center;
}

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

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

    .nav-shell {
        gap: 14px;
    }

    .header-search {
        margin-left: auto;
    }

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

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

@media (max-width: 820px) {
    .header-search {
        display: none;
    }

    .hero {
        min-height: 620px;
        height: 76vh;
    }

    .hero-content {
        left: 20px;
        width: calc(100% - 40px);
        bottom: 82px;
    }

    .hero-dots {
        left: 20px;
        right: auto;
        bottom: 38px;
    }

    .quick-search-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .wide-search {
        flex-direction: column;
        align-items: stretch;
    }

    .section-heading,
    .footer-shell,
    .player-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .category-card-large,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .player-section {
        margin-top: -70px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar select {
        width: 100%;
    }
}

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

    .site-logo span:last-child {
        font-size: 1rem;
    }

    .logo-mark {
        width: 30px;
        height: 30px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.035em;
    }

    .quick-search-panel,
    .page-shell,
    .content-section,
    .filter-bar,
    .detail-shell,
    .player-section,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

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

    .category-tile {
        min-height: 160px;
    }

    .movie-card-link {
        border-radius: 18px;
    }

    .poster-wrap {
        aspect-ratio: 16 / 10;
    }

    .detail-poster {
        display: none;
    }

    .detail-hero {
        min-height: 640px;
    }

    .player-start {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
}
