:root {
    --primary-50: #fef6ee;
    --primary-100: #fde9d7;
    --primary-400: #f38344;
    --primary-500: #f0641f;
    --primary-600: #e14915;
    --primary-700: #bb3513;
    --secondary-100: #ccfbef;
    --secondary-500: #14b8a6;
    --accent-50: #fff7ed;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-400: #a8a29e;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 16px 35px rgba(28, 25, 23, 0.12);
    --shadow-hard: 0 24px 50px rgba(28, 25, 23, 0.25);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--neutral-900);
    background: var(--neutral-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

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

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(240, 100, 31, 0.28);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 20px;
    line-height: 1;
}

.brand-text small {
    color: var(--neutral-600);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--neutral-700);
    font-weight: 600;
    white-space: nowrap;
}

.main-nav a,
.mobile-panel a {
    transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
    color: var(--primary-600);
}

.search-shell {
    position: relative;
}

.header-search {
    width: min(300px, 28vw);
    margin-left: auto;
}

.search-shell input,
.local-search-wrap input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    outline: none;
    background: #fff;
    color: var(--neutral-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-shell input,
.local-search-wrap input {
    padding: 12px 18px;
}

.filter-bar select {
    padding: 10px 14px;
}

.search-shell input:focus,
.local-search-wrap input:focus,
.filter-bar select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(240, 100, 31, 0.12);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 80;
    display: none;
    max-height: 420px;
    overflow: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--neutral-200);
    border-radius: 18px;
    box-shadow: var(--shadow-hard);
}

.search-results.is-open {
    display: grid;
    gap: 6px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 10px;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: var(--primary-50);
}

.search-result-item img {
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.search-result-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.search-result-item small {
    color: var(--neutral-500);
    font-size: 12px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: var(--neutral-900);
}

.mobile-panel {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid var(--neutral-200);
}

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

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

.hero-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-50), #fff, var(--secondary-100));
}

.hero-bg {
    position: absolute;
    inset: -20% -10% auto auto;
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, rgba(240, 100, 31, 0.18), transparent 68%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px 56px;
}

.hero-slider {
    min-height: 500px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: center;
    gap: 48px;
    min-height: 500px;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 0.55s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 13px;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-copy h1,
.page-hero h1,
.watch-title-row h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-intro {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--neutral-600);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span {
    padding: 6px 11px;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

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

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

.btn.primary {
    color: #fff;
    background: var(--primary-500);
    box-shadow: 0 14px 28px rgba(240, 100, 31, 0.28);
}

.btn.primary:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
}

.btn.ghost {
    color: var(--primary-700);
    background: #fff;
    border: 1px solid rgba(240, 100, 31, 0.24);
}

.btn.ghost-light {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(12px);
}

.btn.small {
    min-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 14px;
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: var(--shadow-hard);
    transform: rotate(1.5deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--neutral-300);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 36px;
    background: var(--primary-500);
}

.hero-rank-link,
.section-more {
    color: var(--primary-600);
    font-weight: 800;
}

.hero-search {
    max-width: 780px;
    margin-top: 32px;
}

.hero-search input {
    min-height: 58px;
    padding: 0 24px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

.section-soft {
    max-width: none;
    padding-inline: max(24px, calc((100vw - 1280px) / 2 + 24px));
    background: #fff;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--neutral-600);
}

.light-heading h2,
.light-heading p,
.light-more {
    color: #fff;
}

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

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.category-name,
.category-overview-title {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
}

.category-card strong,
.category-overview-card p {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.category-count,
.muted-count {
    display: inline-flex;
    margin-top: 20px;
    padding: 6px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.category-preview {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

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

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

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

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--neutral-100);
}

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

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(240, 100, 31, 0.92);
    border-radius: 999px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
}

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

.meta-line {
    color: var(--neutral-500);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.ranking-info h3 a:hover {
    color: var(--primary-600);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.section-rank {
    max-width: none;
    padding-inline: max(24px, calc((100vw - 1280px) / 2 + 24px));
    background: linear-gradient(135deg, var(--neutral-900), #3b2418);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 56px 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.ranking-rank {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: var(--primary-500);
    border-radius: 14px;
    font-weight: 900;
}

.ranking-cover {
    overflow: hidden;
    border-radius: 14px;
}

.ranking-cover img {
    height: 126px;
    object-fit: cover;
}

.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.ranking-info p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-hero {
    display: grid;
    place-items: center;
    min-height: 320px;
    padding: 68px 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-50), #fff, var(--secondary-100));
}

.page-hero > div {
    max-width: 820px;
}

.page-hero p {
    margin: 0;
    color: var(--neutral-600);
    font-size: 18px;
}

.dark-page-hero {
    color: #fff;
    background: linear-gradient(135deg, var(--neutral-900), #4a281b);
}

.dark-page-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.category-overview-card {
    min-height: auto;
    background: #fff;
    color: var(--neutral-900);
}

.category-overview-title {
    color: var(--neutral-900);
}

.category-overview-card p {
    color: var(--neutral-600);
}

.category-overview-card .muted-count {
    color: var(--primary-700);
    background: var(--primary-100);
}

.compact-list {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.compact-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: var(--neutral-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: var(--primary-50);
    transform: translateX(3px);
}

.compact-card img {
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.compact-card small {
    display: block;
    margin-top: 4px;
    color: var(--neutral-500);
    font-size: 12px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr repeat(3, minmax(140px, 180px));
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--neutral-200);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
}

.filter-bar label {
    display: grid;
    gap: 6px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 800;
}

.movie-card.is-hidden {
    display: none;
}

.watch-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--neutral-900);
}

.watch-hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.05);
}

.watch-hero-inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 50px 24px 68px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.watch-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 40px;
}

.watch-title-row p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    max-width: 1280px;
    margin: -36px auto 0;
    padding: 0 24px 70px;
    position: relative;
    z-index: 2;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 24px;
    box-shadow: var(--shadow-hard);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.2));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    font-size: 34px;
}

.detail-card,
.side-card {
    margin-top: 24px;
    padding: 28px;
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 24px;
    color: var(--neutral-700);
    font-size: 16px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta-grid div {
    display: grid;
    gap: 6px;
    padding: 16px;
    background: var(--neutral-50);
    border-radius: 16px;
}

.detail-meta-grid strong {
    color: var(--neutral-500);
    font-size: 13px;
}

.detail-tags span {
    margin-bottom: 4px;
}

.watch-side {
    position: relative;
}

.side-card {
    position: sticky;
    top: 96px;
}

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 34px;
}

.footer-about h2,
.footer-col h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-about p {
    max-width: 440px;
    margin: 0;
}

.footer-col ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 26px;
    border-top: 1px solid var(--neutral-800);
    color: var(--neutral-400);
    font-size: 14px;
}

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

    .header-search {
        width: min(380px, 42vw);
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr 320px;
    }

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

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

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

    .side-card {
        position: static;
    }
}

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

    .brand-text small,
    .header-search {
        display: none;
    }

    .hero-inner {
        padding: 44px 16px 40px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-poster {
        max-width: 320px;
        margin: 0 auto;
        transform: none;
    }

    .content-section,
    .section-soft,
    .section-rank {
        padding: 42px 16px;
    }

    .section-heading,
    .hero-controls,
    .watch-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .ranking-item {
        grid-template-columns: 42px 76px 1fr;
        gap: 12px;
    }

    .ranking-cover img {
        height: 104px;
    }

    .filter-bar,
    .footer-inner,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .watch-hero-inner {
        padding: 36px 16px 58px;
    }

    .watch-layout {
        margin-top: -28px;
        padding: 0 16px 48px;
    }

    .detail-card,
    .side-card {
        padding: 22px;
    }
}

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

    .hero-copy h1,
    .page-hero h1,
    .watch-title-row h1 {
        font-size: 34px;
    }

    .hero-search input {
        min-height: 52px;
    }

    .footer-inner {
        padding-top: 42px;
    }
}
