:root {
    --bg: #0a0e13;
    --bg-soft: #111821;
    --panel: rgba(31, 41, 55, 0.58);
    --panel-strong: rgba(15, 23, 42, 0.88);
    --line: rgba(114, 102, 80, 0.42);
    --line-soft: rgba(148, 163, 184, 0.15);
    --text: #edeae3;
    --muted: #9ca3af;
    --soft: #cbd5e1;
    --amber: #d97706;
    --amber-light: #fbbf24;
    --amber-dark: #92400e;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.16), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(79, 70, 229, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: "Noto Serif SC", "Songti SC", Georgia, serif;
    letter-spacing: 0.01em;
}

p {
    margin: 0;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-zen {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.text-gradient {
    background: linear-gradient(90deg, var(--amber-light), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.94);
    border-bottom: 1px solid rgba(114, 102, 80, 0.36);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 1.35rem;
    line-height: 1;
    background: linear-gradient(90deg, var(--amber-light), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy small {
    color: #94a3b8;
    font-size: 0.75rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    color: #d6d3ca;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--amber-light);
}

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

.header-search input,
.mobile-search input,
.filter-input,
.filter-select,
.search-page-input {
    color: var(--text);
    background: rgba(17, 24, 39, 0.68);
    border: 1px solid rgba(114, 102, 80, 0.56);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus,
.search-page-input:focus {
    border-color: rgba(251, 191, 36, 0.78);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
    background: rgba(17, 24, 39, 0.9);
}

.header-search button,
.mobile-search button,
.search-submit {
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--amber);
    padding: 10px 14px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-submit:hover,
.btn-primary:hover {
    transform: translateY(-1px) scale(1.02);
    background: #b45309;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(114, 102, 80, 0.5);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.72);
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 18px 24px 24px;
    border-top: 1px solid rgba(114, 102, 80, 0.34);
    background: rgba(2, 6, 23, 0.98);
}

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

.mobile-link {
    padding: 8px 0;
    color: #d6d3ca;
    font-weight: 700;
}

.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
}

.mobile-categories a,
.tag-pill,
.movie-tags span,
.info-pill,
.hero-tags span {
    border: 1px solid rgba(217, 119, 6, 0.32);
    background: rgba(217, 119, 6, 0.14);
    color: #fbbf24;
    border-radius: 999px;
}

.mobile-categories a {
    padding: 6px 10px;
    font-size: 0.86rem;
}

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

.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-image {
    position: absolute;
    inset: 0;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, #0a0e13 0%, rgba(10, 14, 19, 0.12) 42%, rgba(10, 14, 19, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 74px;
}

.hero-panel {
    width: min(680px, 100%);
}

.hero-kicker,
.section-kicker,
.breadcrumb,
.page-eyebrow {
    color: var(--amber-light);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 14px;
}

.hero-panel h1,
.hero-panel h2 {
    font-size: clamp(2.25rem, 5vw, 4.8rem);
    line-height: 1.08;
    color: #fff;
    margin-bottom: 18px;
}

.hero-panel p {
    color: #d1d5db;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.85;
    margin-bottom: 24px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-tags span {
    padding: 6px 12px;
    font-size: 0.9rem;
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: var(--amber);
}

.btn-secondary {
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.5);
}

.btn-secondary:hover {
    border-color: rgba(251, 191, 36, 0.55);
    color: #fbbf24;
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(2, 6, 23, 0.54);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.78);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.section-block {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.52), rgba(10, 14, 19, 0));
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    color: #f8fafc;
    font-size: clamp(1.85rem, 4vw, 3rem);
    line-height: 1.2;
}

.section-head p,
.page-hero p,
.category-intro,
.detail-title p {
    color: var(--muted);
    line-height: 1.75;
    margin-top: 10px;
}

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

.grid-cards.compact-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.card-zen,
.movie-card,
.category-card,
.info-panel,
.player-shell,
.detail-copy,
.rank-card,
.search-box,
.filter-bar {
    border: 1px solid rgba(114, 102, 80, 0.48);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79, 72, 59, 0.42), rgba(17, 24, 39, 0.42));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
}

.movie-card {
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    border-color: rgba(251, 191, 36, 0.46);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.movie-cover {
    position: relative;
    height: 245px;
    overflow: hidden;
    background: #111827;
}

.movie-cover img,
.movie-list-cover img,
.rank-link img,
.related-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover img,
.movie-card-list:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.duration-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.76);
    color: #e5e7eb;
    font-size: 0.78rem;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card-body h3,
.movie-list-body h3,
.related-card h3 {
    color: #f8fafc;
    font-size: 1rem;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.movie-card-list:hover h3,
.related-card:hover h3 {
    color: var(--amber-light);
}

.movie-card-body p,
.movie-list-body p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.movie-tags span,
.info-pill,
.tag-pill {
    padding: 5px 9px;
    font-size: 0.78rem;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.82rem;
}

.movie-card-list {
    padding: 0;
}

.movie-list-link {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    padding: 14px;
}

.movie-list-cover {
    position: relative;
    height: 128px;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
    font-weight: 800;
}

.movie-list-body {
    display: grid;
    align-content: center;
    gap: 10px;
}

.horizontal-scroll {
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-track {
    display: flex;
    gap: 22px;
    width: max-content;
}

.scroll-track .movie-card {
    width: 298px;
}

.page-hero {
    padding: 72px 0 40px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: #fff7ed;
}

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

.category-card {
    padding: 22px;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card h2,
.category-card h3 {
    color: #fff;
    font-size: 1.28rem;
    margin-bottom: 10px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.75;
    font-size: 0.94rem;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(120px, 0.7fr));
    gap: 12px;
    padding: 16px;
    margin-bottom: 26px;
}

.filter-input,
.filter-select,
.search-page-input {
    width: 100%;
    padding: 12px 14px;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--muted);
}

.empty-state.show {
    display: block;
}

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

.rank-card {
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-link {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr) 180px 88px;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
}

.rank-number {
    color: var(--amber-light);
    font-size: 1.25rem;
    font-weight: 900;
}

.rank-link img {
    width: 82px;
    height: 58px;
    border-radius: 10px;
}

.rank-title {
    color: #f8fafc;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info,
.rank-heat {
    color: var(--muted);
    font-size: 0.92rem;
}

.detail-hero {
    padding: 56px 0 34px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.65fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    overflow: hidden;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-frame video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(217, 119, 6, 0.18), rgba(2, 6, 23, 0.52)),
        rgba(2, 6, 23, 0.18);
    color: #fff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
    box-shadow: 0 18px 42px rgba(217, 119, 6, 0.34);
    font-size: 2rem;
    padding-left: 4px;
}

.player-shell.is-playing .player-start {
    opacity: 0;
    visibility: hidden;
}

.player-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
}

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

.detail-title h1 {
    margin-bottom: 14px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.detail-poster {
    height: 470px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(114, 102, 80, 0.48);
}

.info-panel {
    padding: 20px;
    margin-top: 18px;
}

.info-panel dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-panel div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    color: var(--muted);
}

.info-panel dt {
    color: #e5e7eb;
    font-weight: 800;
}

.info-panel dd {
    margin: 0;
}

.detail-copy {
    padding: 28px;
    margin-top: 28px;
}

.detail-copy h2 {
    color: #fff;
    font-size: 1.55rem;
    margin-bottom: 16px;
}

.detail-copy p {
    color: #d1d5db;
    line-height: 2;
    margin-bottom: 22px;
}

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

.related-card {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(114, 102, 80, 0.42);
    background: rgba(15, 23, 42, 0.58);
}

.related-card img {
    height: 148px;
}

.related-card h3 {
    padding: 12px;
    font-size: 0.92rem;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    margin: 24px 0 32px;
}

.search-results {
    min-height: 240px;
}

.hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .site-nav {
        gap: 16px;
    }

    .header-search input {
        width: 170px;
    }

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

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

@media (max-width: 860px) {
    .site-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 70px;
    }

    .hero-arrow {
        display: none;
    }

    .section-head,
    .detail-grid {
        display: grid;
    }

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .list-grid {
        grid-template-columns: 1fr;
    }

    .rank-link {
        grid-template-columns: 44px 72px minmax(0, 1fr);
    }

    .rank-info,
    .rank-heat {
        display: none;
    }

    .movie-list-link {
        grid-template-columns: 138px 1fr;
    }

    .detail-poster {
        height: 390px;
    }
}

@media (max-width: 560px) {
    .container-zen {
        width: min(100% - 24px, 1280px);
    }

    .brand-copy small {
        display: none;
    }

    .brand-copy strong {
        font-size: 1.08rem;
    }

    .hero-carousel {
        height: 530px;
    }

    .hero-panel h1,
    .hero-panel h2 {
        font-size: 2.18rem;
    }

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

    .movie-cover {
        height: 235px;
    }

    .movie-list-link {
        grid-template-columns: 1fr;
    }

    .movie-list-cover {
        height: 210px;
    }

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