:root {
    --stone-950: #1c1917;
    --stone-900: #292524;
    --stone-800: #44403c;
    --stone-700: #57534e;
    --stone-600: #78716c;
    --stone-500: #a8a29e;
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-200: #fde68a;
    --cream: #fff7ed;
    --paper: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(120, 113, 108, 0.18);
    --shadow: 0 24px 80px rgba(28, 25, 23, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
        linear-gradient(180deg, #fffaf0 0%, #f8f5ef 42%, #fffaf0 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(41, 37, 36, 0.96), rgba(120, 53, 15, 0.96), rgba(41, 37, 36, 0.96));
    border-bottom: 2px solid rgba(245, 158, 11, 0.82);
    box-shadow: 0 18px 50px rgba(28, 25, 23, 0.22);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.28);
}

.brand-text {
    font-size: 1.45rem;
    color: var(--amber-200);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: rgba(255, 251, 235, 0.82);
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(245, 158, 11, 0.22);
}

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

.top-search {
    margin-left: auto;
    width: min(360px, 38vw);
}

.top-search input,
.mobile-search input,
.large-search input,
.local-filter input {
    width: 100%;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    outline: none;
    transition: 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.local-filter input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.top-search button,
.mobile-search button,
.large-search button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(253, 230, 138, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #fff;
}

.mobile-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--stone-950), var(--amber-900), var(--stone-900));
}

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

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

.hero-media {
    position: absolute;
    inset: 0;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08)),
        radial-gradient(circle at 20% 70%, rgba(245, 158, 11, 0.28), transparent 32rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 72px 0 96px;
}

.hero-kicker,
.kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--amber-600);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-kicker {
    color: var(--amber-200);
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(253, 230, 138, 0.28);
}

.hero h1 {
    max-width: 760px;
    margin: 22px 0 10px;
    font-size: clamp(2.35rem, 6vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin: 0 0 18px;
    color: var(--amber-200);
    font-size: clamp(1.5rem, 3vw, 2.6rem);
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.15rem;
    line-height: 1.9;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--amber-900);
    background: rgba(253, 230, 138, 0.85);
    font-size: 0.82rem;
    font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.22s ease;
}

.primary-btn {
    padding: 14px 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.34);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 56px rgba(245, 158, 11, 0.46);
}

.ghost-btn {
    padding: 13px 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.content-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.quick-search-section {
    padding-top: 38px;
    padding-bottom: 26px;
}

.quick-search-card,
.text-card,
.category-block,
.rank-panel,
.episode-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    padding: clamp(24px, 4vw, 42px);
}

.quick-search-card h2,
.section-heading h2,
.page-hero h1,
.detail-intro h1,
.text-card h2,
.rank-panel h2,
.episode-panel h2 {
    margin: 10px 0 12px;
    color: var(--stone-900);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.quick-search-card h2,
.page-hero h1,
.detail-intro h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
}

.large-search {
    margin-top: 22px;
    max-width: 760px;
}

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

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.section-heading p,
.quick-search-card p,
.page-hero p,
.category-block p,
.text-card p,
.site-footer p,
#search-summary {
    color: var(--muted);
    line-height: 1.85;
}

.section-more,
.text-link {
    color: var(--amber-800);
}

.section-more:hover,
.text-link:hover {
    color: var(--amber-600);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 16px 42px rgba(28, 25, 23, 0.10);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 68px rgba(28, 25, 23, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: var(--stone-900);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
    opacity: 0;
    transition: 0.24s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
}

.play-chip {
    left: 14px;
    bottom: 14px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transform: translateY(8px);
    transition: 0.24s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #ef4444, var(--amber-500));
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--stone-600);
    font-size: 0.84rem;
    font-weight: 800;
}

.movie-meta-line span,
.detail-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(120, 113, 108, 0.1);
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--stone-900);
    font-size: 1.08rem;
    line-height: 1.36;
}

.movie-card h3 a:hover {
    color: var(--amber-700);
}

.movie-card p {
    min-height: 3.4em;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.94rem;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    background: var(--stone-900);
    box-shadow: var(--shadow);
}

.category-tile img,
.category-glow {
    position: absolute;
    inset: 0;
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: 0.4s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
    opacity: 0.55;
}

.category-glow {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(28, 25, 23, 0.86));
}

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    font-size: 1.4rem;
}

.category-tile small {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.split-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 28px;
    align-items: start;
}

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

.movie-list-compact .movie-card {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.movie-list-compact .poster-link {
    height: 100%;
    min-height: 190px;
}

.rank-panel,
.episode-panel {
    padding: 24px;
}

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

.rank-panel li a {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.08);
    font-weight: 800;
}

.rank-panel li a:hover {
    background: rgba(245, 158, 11, 0.16);
}

.rank-panel li span {
    color: var(--amber-700);
    font-weight: 900;
}

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(28, 25, 23, 0.94), rgba(120, 53, 15, 0.88)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.35), transparent 28rem);
}

.page-hero > div {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.page-hero h1,
.page-hero p {
    max-width: 850px;
    color: #fff;
}

.hero-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-link-row a {
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--amber-200);
    background: rgba(255, 255, 255, 0.1);
}

.local-filter {
    margin: -6px 0 24px;
    max-width: 520px;
}

.category-overview {
    display: grid;
    gap: 28px;
}

.category-block {
    padding: 24px;
}

.category-block-head {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.category-block-head img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 18px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--stone-950);
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: blur(4px);
    transform: scale(1.03);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44));
}

.detail-shell {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
    padding: 70px 0;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.4);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 700;
}

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

.detail-intro h1 {
    color: #fff;
    font-size: clamp(2.4rem, 6vw, 5rem);
}

.lead {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.9;
    font-size: 1.13rem;
}

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

.detail-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
}

.large-tags {
    margin-bottom: 24px;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 24px;
    align-items: start;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 28px 90px rgba(28, 25, 23, 0.28);
    cursor: pointer;
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.35);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #fff;
}

.episode-panel {
    position: sticky;
    top: 96px;
}

.episode-item {
    display: block;
    margin-top: 12px;
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--stone-800);
    background: rgba(245, 158, 11, 0.1);
    font-weight: 900;
}

.episode-item.active,
.episode-item:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
}

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

.text-card {
    padding: clamp(24px, 3vw, 36px);
}

.site-footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.76);
    background: linear-gradient(90deg, var(--stone-950), var(--amber-900), var(--stone-950));
}

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

.footer-brand {
    color: var(--amber-200);
    font-size: 1.3rem;
}

.footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

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

.empty-state {
    grid-column: 1 / -1;
    border: 1px dashed rgba(245, 158, 11, 0.42);
    border-radius: 18px;
    padding: 32px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

@media (max-width: 1180px) {
    .all-grid,
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .top-search {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }
}

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

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero h1 {
        font-size: clamp(2rem, 12vw, 3.3rem);
    }

    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .split-showcase,
    .player-layout,
    .detail-content,
    .detail-shell {
        grid-template-columns: 1fr;
    }

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

    .episode-panel {
        position: static;
    }

    .category-block-head {
        grid-template-columns: 1fr;
    }

    .category-block-head img {
        width: 100%;
        height: 190px;
    }
}

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

    .brand-text {
        font-size: 1.15rem;
    }

    .content-section {
        width: min(100% - 22px, 1240px);
        padding: 44px 0;
    }

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

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

    .poster-link {
        height: 310px;
    }

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

    .hero-actions {
        width: 100%;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }
}
