:root {
    --bg: #0f1117;
    --panel: #171923;
    --panel-soft: rgba(23, 25, 35, 0.78);
    --text: #f8fafc;
    --muted: #a3a8b8;
    --line: rgba(255, 255, 255, 0.1);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.16);
    --red: #991b1b;
    --orange: #c2410c;
    --radius: 18px;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.16), transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(153, 27, 27, 0.2), transparent 34%),
        linear-gradient(180deg, #111827 0%, #0f1117 42%, #050609 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.94), rgba(127, 29, 29, 0.94), rgba(154, 52, 18, 0.94));
    color: #fff;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.site-nav {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #451a03;
    background: linear-gradient(135deg, #fcd34d, #fb923c);
    box-shadow: 0 0 26px rgba(245, 158, 11, 0.38);
}

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

.logo-text {
    font-size: 24px;
    background: linear-gradient(90deg, #fde68a, #fdba74);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #fcd34d;
}

.nav-search,
.mobile-search,
.home-search-panel form,
.search-page-panel form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.home-search-panel input,
.search-page-panel input,
.list-tools input,
.list-tools select {
    border: 1px solid rgba(255, 255, 255, 0.16);
    outline: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 10px 14px;
}

.nav-search input {
    width: 190px;
    transition: width 0.25s ease, border-color 0.2s ease;
}

.nav-search input:focus {
    width: 250px;
    border-color: rgba(252, 211, 77, 0.75);
}

.nav-search button,
.mobile-search button,
.home-search-panel button,
.search-page-panel button {
    border: 0;
    color: #451a03;
    font-weight: 800;
    background: linear-gradient(135deg, #facc15, #fb923c);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.mobile-nav {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.98), rgba(124, 45, 18, 0.98));
}

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

.mobile-search input {
    flex: 1;
}

main {
    padding-top: 68px;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #090b10;
}

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

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

.hero-slide img,
.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 6, 9, 0.9), rgba(17, 24, 39, 0.64) 45%, rgba(17, 24, 39, 0.18)),
        linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0.74) 18%, transparent 62%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1220px) / 2));
    right: 32px;
    bottom: 14%;
    max-width: 760px;
    z-index: 2;
}

.hero-tags,
.tag-row,
.detail-meta,
.card-meta,
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.34);
    padding: 5px 10px;
    font-size: 13px;
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.58);
}

.hero-content p {
    margin: 0 0 18px;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    color: #d1d5db;
    font-size: 14px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #451a03;
    background: linear-gradient(135deg, #facc15, #fb923c);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.26);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-3px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.46);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.home-search-panel,
.page-shell,
.content-section,
.watch-layout,
.related-section,
.ranking-grid {
    width: min(1220px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.home-search-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
    margin-top: -56px;
    position: relative;
    z-index: 8;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-panel h2,
.page-title-block h1,
.section-heading h2,
.player-section h2,
.detail-copy h2,
.side-card h2,
.rank-panel h2 {
    margin: 0;
}

.home-search-panel p,
.section-heading p,
.page-title-block p,
.category-card-large p,
.detail-copy p,
.footer-grid p {
    color: var(--muted);
}

.home-search-panel input,
.search-page-panel input {
    flex: 1;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.08);
}

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

.content-section.flush-top {
    padding-top: 0;
}

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

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

.section-heading a {
    color: #fbbf24;
    font-weight: 700;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.94), rgba(17, 24, 39, 0.94));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.36);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.36);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #7f1d1d);
}

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

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

.rating-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    min-width: 42px;
    border-radius: 999px;
    color: #451a03;
    background: #fbbf24;
    font-weight: 900;
    text-align: center;
    padding: 4px 9px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #aeb4c3;
    font-size: 14px;
}

.card-meta {
    margin-bottom: 12px;
}

.tag-row {
    gap: 6px;
}

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

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

.category-tile,
.category-card-large {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #151923;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile img,
.category-card-large img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.category-tile::after,
.category-card-large a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 6, 9, 0.88), rgba(5, 6, 9, 0.18));
}

.category-tile span,
.category-tile small,
.category-card-large span {
    position: relative;
    z-index: 2;
    display: block;
}

.category-tile span,
.category-card-large span {
    margin: 118px 18px 8px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile small {
    margin: 0 18px 18px;
    color: #d1d5db;
}

.category-card-large a {
    position: relative;
    display: block;
    min-height: 190px;
}

.category-card-large p {
    position: relative;
    margin: 0;
    padding: 18px;
    background: rgba(17, 24, 39, 0.92);
}

.page-shell {
    padding-top: 120px;
}

.page-title-block {
    margin-bottom: 34px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.34), rgba(31, 41, 55, 0.72));
    box-shadow: var(--shadow);
}

.page-title-block h1 {
    margin-top: 8px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.eyebrow {
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.list-tools {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.list-tools input {
    flex: 1;
}

.list-tools select {
    color: #fff;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 34px;
}

.pagination a,
.pagination strong,
.pagination span {
    min-width: 42px;
    border-radius: 12px;
    padding: 9px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination strong {
    color: #451a03;
    background: #fbbf24;
}

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

.rank-panel {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: var(--shadow);
    padding: 22px;
}

.rank-panel ol {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.rank-panel li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px 12px;
    align-items: center;
}

.rank-num {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #451a03;
    background: #fbbf24;
    font-weight: 900;
}

.rank-panel a {
    font-weight: 800;
}

.rank-panel small {
    color: var(--muted);
}

.search-page-panel {
    margin-bottom: 34px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--line);
}

.search-summary {
    margin: 14px 0 0;
    color: var(--muted);
}

.detail-page {
    padding-top: 68px;
}

.detail-hero {
    position: relative;
    height: 62vh;
    min-height: 480px;
    overflow: hidden;
    background: #090b10;
}

.detail-hero-content {
    position: absolute;
    left: max(28px, calc((100vw - 1220px) / 2));
    right: 28px;
    bottom: 58px;
    max-width: 850px;
    z-index: 3;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fcd34d;
    font-size: 14px;
    margin-bottom: 16px;
}

.detail-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.detail-hero-content > p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding-top: 36px;
}

.watch-main,
.detail-side,
.player-section,
.detail-copy,
.side-card {
    min-width: 0;
}

.player-section,
.detail-copy,
.side-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: var(--shadow);
    padding: 22px;
}

.video-frame {
    position: relative;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.24), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

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

.play-symbol {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #451a03;
    background: #fbbf24;
    font-size: 34px;
    box-shadow: 0 0 42px rgba(245, 158, 11, 0.44);
}

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

.detail-copy h2:not(:first-child) {
    margin-top: 24px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px 12px;
    margin: 18px 0 0;
}

.side-card dt {
    color: #fbbf24;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #d1d5db;
}

.site-footer {
    margin-top: 72px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.78), #050609);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    color: #6b7280;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.is-filtered-out {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

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

    .movie-grid,
    .category-grid,
    .category-grid.large,
    .ranking-grid,
    .watch-layout,
    .home-search-panel,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .watch-layout,
    .home-search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .site-nav {
        width: calc(100% - 20px);
        gap: 10px;
    }

    .logo-text {
        font-size: 18px;
    }

    .nav-search {
        display: none;
    }

    .hero-carousel {
        min-height: 78vh;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 82px;
    }

    .hero-content p,
    .detail-hero-content > p {
        font-size: 15px;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-panel,
    .page-title-block,
    .player-section,
    .detail-copy,
    .side-card,
    .search-page-panel {
        padding: 18px;
        border-radius: 18px;
    }

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

    .list-tools {
        flex-direction: column;
    }

    .page-shell {
        padding-top: 96px;
    }

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

    .detail-hero-content {
        left: 18px;
        right: 18px;
        bottom: 34px;
    }
}
