:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-soft: #1e293b;
    --line: #334155;
    --muted: #94a3b8;
    --text: #ffffff;
    --text-soft: #cbd5e1;
    --brand: #f59e0b;
    --brand-soft: #fbbf24;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--brand), var(--brand-soft));
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.32);
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 10px;
}

.nav-link {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.top-search input,
.mobile-search input,
.filter-input {
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.76);
    border-radius: 12px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: 240px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.top-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.filter-chip,
.player-button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
}

.top-search button,
.mobile-search button,
.primary-btn,
.player-button {
    color: #111827;
    background: linear-gradient(135deg, var(--brand), var(--brand-soft));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25);
}

.ghost-btn,
.filter-chip {
    color: var(--text-soft);
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--line);
}

.ghost-btn:hover,
.filter-chip:hover {
    color: var(--brand);
    border-color: rgba(245, 158, 11, 0.6);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    color: var(--text);
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px 24px 22px;
    background: #111827;
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.mobile-search input {
    width: 100%;
}

.mobile-links {
    display: grid;
    gap: 12px;
}

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

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s 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-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.18), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.22)),
        linear-gradient(0deg, #0f172a, rgba(15, 23, 42, 0.15));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 96px 24px 90px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.hero-kicker {
    display: inline-flex;
    color: #111827;
    background: var(--brand);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 18px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 28px;
    color: var(--text-soft);
    font-size: 18px;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.page-wrap,
.content-section,
.breadcrumb,
.detail-layout,
.listing-header,
.category-overview,
.player-page {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.content-section,
.category-overview {
    padding-top: 58px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading.with-actions,
.listing-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2,
.listing-header h1,
.category-card h2,
.detail-copy h1,
.player-copy h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.section-heading p,
.listing-header p,
.category-card p,
.detail-copy p,
.player-copy p,
.footer-inner p {
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 18px;
    background: linear-gradient(180deg, #1e293b, #111827);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 24px 50px rgba(245, 158, 11, 0.12);
}

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

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

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

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

.poster-year {
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.68);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.card-content {
    padding: 16px;
}

.card-content h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    min-height: 45px;
}

.card-content p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    min-height: 44px;
}

.card-meta,
.tag-row,
.detail-meta,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--text-soft);
    background: rgba(51, 65, 85, 0.72);
    font-size: 12px;
}

.card-meta span:first-child,
.detail-meta span:first-child {
    color: var(--brand);
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
    display: none;
}

.rail-card {
    flex: 0 0 288px;
}

.rail-controls {
    display: flex;
    gap: 8px;
}

.rail-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: var(--panel-soft);
    cursor: pointer;
    font-size: 26px;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 64px 78px 1fr auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: rgba(30, 41, 59, 0.74);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.65);
}

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

.rank-item img {
    width: 78px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-main strong,
.rank-main em {
    display: block;
}

.rank-main em {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.rank-side {
    color: var(--text-soft);
    font-size: 14px;
    white-space: nowrap;
}

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

.category-card {
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    background:
        radial-gradient(circle at 82% 12%, rgba(245, 158, 11, 0.17), transparent 28%),
        linear-gradient(180deg, #1e293b, #111827);
    box-shadow: var(--shadow);
}

.category-card h2 {
    font-size: 24px;
}

.category-card ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    color: var(--text-soft);
    font-size: 14px;
}

.category-card .primary-btn {
    display: inline-flex;
    margin-top: 20px;
}

.listing-hero {
    padding-top: 54px;
    padding-bottom: 18px;
}

.filter-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.filter-input {
    width: min(420px, 100%);
}

.breadcrumb {
    padding-top: 26px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-soft);
}

.breadcrumb a:hover {
    color: var(--brand);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 32px;
    padding-top: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.detail-copy {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(17, 24, 39, 0.92));
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin-top: 10px;
}

.detail-intro {
    margin: 18px 0 22px;
    color: var(--text-soft);
    font-size: 17px;
}

.copy-block {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.copy-block h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.copy-block p {
    white-space: pre-line;
}

.player-page {
    padding-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.36);
    transition: opacity 0.2s ease;
}

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

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

.player-button {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.player-copy {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    background: rgba(30, 41, 59, 0.72);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: #0b1120;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px 20px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
    color: var(--text-soft);
}

.footer-links a:hover {
    color: var(--brand);
}

.copyright {
    margin: 0;
    padding: 18px 24px 26px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

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

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

    .nav-toggle {
        display: block;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-text {
        font-size: 19px;
    }

    .hero-carousel {
        min-height: 520px;
    }

    .hero-content {
        padding: 80px 18px 78px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .content-section,
    .category-overview,
    .listing-header,
    .detail-layout,
    .breadcrumb,
    .player-page,
    .filter-bar {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .card-content {
        padding: 13px;
    }

    .card-content h3 {
        font-size: 15px;
    }

    .card-content p {
        font-size: 13px;
    }

    .section-heading.with-actions,
    .listing-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-item a {
        grid-template-columns: 42px 68px 1fr;
    }

    .rank-side {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .mobile-search {
        flex-direction: column;
    }

    .hero-actions {
        width: 100%;
    }

    .primary-btn,
    .ghost-btn {
        justify-content: center;
        width: 100%;
        text-align: center;
    }
}
