:root {
    --bg: #faf9f7;
    --surface: #ffffff;
    --surface-soft: #fdf8f3;
    --text: #1c1917;
    --muted: #6a5f54;
    --line: #e8e4dc;
    --primary: #d4884b;
    --primary-deep: #b96535;
    --accent: #ed7516;
    --dark: #1c1917;
    --dark-soft: #292524;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
    --shadow-strong: 0 24px 70px rgba(28, 25, 23, .22);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(212, 136, 75, .12), transparent 28rem), var(--bg);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(232, 228, 220, .9);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--dark);
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(212, 136, 75, .28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    font-size: 14px;
    color: #5b5249;
}

.main-nav a {
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color .25s ease, border-color .25s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--primary-deep);
    border-bottom-color: var(--primary);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 300px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(250, 249, 247, .88);
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 6px 10px;
    color: var(--text);
}

.header-search button,
.primary-button,
.ghost-button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}

.header-search button,
.primary-button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(212, 136, 75, .25);
}

.header-search button {
    padding: 7px 14px;
    font-size: 13px;
}

.primary-button,
.ghost-button {
    padding: 12px 22px;
}

.primary-button:hover,
.header-search button:hover,
.ghost-button:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.ghost-button,
.section-more,
.text-link {
    color: var(--primary-deep);
    border: 1px solid rgba(212, 136, 75, .35);
    background: rgba(255, 255, 255, .78);
}

.section-more,
.text-link {
    padding: 9px 16px;
    font-size: 14px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--dark);
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.mobile-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted);
}

.mobile-nav a:hover {
    color: var(--primary-deep);
    background: var(--surface-soft);
}

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

.hero-carousel {
    position: relative;
    height: min(72vh, 660px);
    min-height: 520px;
    overflow: hidden;
    color: #fff;
    background: var(--dark);
}

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

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.03);
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(237, 117, 22, .34), transparent 22rem),
        linear-gradient(90deg, rgba(0, 0, 0, .88), rgba(0, 0, 0, .52) 45%, rgba(0, 0, 0, .22)),
        linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .05) 54%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: end;
    gap: 60px;
    padding: 96px 0 74px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -.05em;
    text-shadow: 0 14px 38px rgba(0, 0, 0, .5);
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .84);
    font-size: 17px;
}

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

.hero-tags span,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: inherit;
    padding: 4px 10px;
    font-size: 12px;
}

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

.hero-poster {
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: var(--shadow-strong);
    transform: rotate(2deg);
}

.hero-poster img {
    height: 100%;
    object-fit: cover;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.main-flow,
.page-shell {
    padding: 54px 0 74px;
}

.content-section {
    margin-top: 54px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2 {
    margin: 0;
    color: var(--dark);
    letter-spacing: -.03em;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-head p,
.page-hero p,
.category-card p,
.detail-one-line,
.detail-content p,
.site-footer p,
.movie-card-body p,
.hot-card p {
    color: var(--muted);
}

.section-head p {
    max-width: 680px;
    margin: 8px 0 0;
}

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

.listing-grid {
    margin-top: 26px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(232, 228, 220, .92);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 136, 75, .38);
    box-shadow: 0 22px 50px rgba(28, 25, 23, .14);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--dark-soft);
}

.poster-wrap img,
.hot-cover img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.movie-card:hover .poster-wrap img,
.hot-card:hover .hot-cover img {
    transform: scale(1.04);
}

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, .72));
}

.rank-badge,
.hot-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    z-index: 2;
}

.hot-index {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 12px;
}

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

.movie-meta-line {
    color: #806f62;
    font-size: 12px;
}

.movie-card .movie-meta-line span,
.hot-card .movie-meta-line span,
.detail-meta span {
    background: var(--surface-soft);
}

.movie-card h3,
.hot-card h3 {
    margin: 10px 0 8px;
    color: var(--dark);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.hot-card h3 a:hover,
.category-card a:hover,
.footer-links a:hover {
    color: var(--primary-deep);
}

.movie-card-body p,
.hot-card p {
    margin: 0;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--primary-deep);
    background: rgba(212, 136, 75, .12);
    font-size: 12px;
    font-weight: 700;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-deep);
}

.channel-grid,
.category-grid {
    display: grid;
    gap: 18px;
}

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

.channel-card,
.category-card {
    display: block;
    min-height: 148px;
    padding: 20px;
    border: 1px solid rgba(232, 228, 220, .9);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #fff, var(--surface-soft));
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, border-color .25s ease;
}

.channel-card:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 136, 75, .38);
}

.channel-card span,
.category-title {
    display: block;
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 20px;
    font-weight: 800;
}

.channel-card strong {
    display: block;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.channel-card em {
    display: block;
    margin-top: 14px;
    color: var(--primary-deep);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

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

.rank-list {
    margin-top: 28px;
}

.hot-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, border-color .25s ease;
}

.hot-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 136, 75, .38);
}

.hot-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--dark-soft);
}

.hot-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hot-title-line h3 {
    margin: 0;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 44px;
    border: 1px solid rgba(232, 228, 220, .9);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(237, 117, 22, .18), transparent 22rem),
        linear-gradient(135deg, #fff, var(--surface-soft));
    box-shadow: var(--shadow-soft);
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.small-hero p,
.category-hero p {
    max-width: 780px;
    margin: 12px 0 0;
    font-size: 17px;
}

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

.category-card ul {
    display: grid;
    gap: 7px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.category-card li {
    color: var(--muted);
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-top: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow-soft);
}

.filter-input-wrap {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.filter-input-wrap input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    padding: 13px 14px;
    background: var(--surface-soft);
    color: var(--text);
}

.filter-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 136, 75, .14);
}

.filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--muted);
    background: #fff;
    cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.filter-empty {
    margin-top: 22px;
    padding: 20px;
    border-radius: var(--radius-lg);
    color: var(--muted);
    background: #fff;
    text-align: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-deep);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 30px;
    border-radius: var(--radius-xl);
    color: #fff;
    background:
        radial-gradient(circle at 80% 10%, rgba(237, 117, 22, .32), transparent 22rem),
        linear-gradient(135deg, #1c1917, #302720 64%, #1c1917);
    box-shadow: var(--shadow-strong);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    background: var(--dark-soft);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.detail-info h1 {
    color: #fff;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.1;
}

.detail-one-line {
    max-width: 820px;
    margin: 16px 0 18px;
    color: rgba(255, 255, 255, .82);
    font-size: 18px;
}

.detail-meta span {
    color: rgba(255, 255, 255, .88);
    background: rgba(255, 255, 255, .12);
}

.player-section,
.detail-content,
.related-section {
    margin-top: 40px;
}

.player-section h2,
.detail-content h2 {
    font-size: 28px;
}

.player-box {
    position: relative;
    margin-top: 18px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow-strong);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .34));
    cursor: pointer;
    transition: opacity .25s ease, visibility .25s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 44px rgba(237, 117, 22, .38);
}

.play-icon::before {
    content: "";
    display: block;
    margin-left: 5px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 22px solid #fff;
}

.player-overlay strong {
    font-size: 18px;
}

.detail-content {
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-soft);
}

.detail-content p {
    margin: 0;
    font-size: 17px;
}

.site-footer {
    padding: 44px 0 28px;
    color: #d9d3c7;
    background: var(--dark);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
    gap: 32px;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.site-footer p {
    max-width: 560px;
    color: #b8ac9d;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.footer-links a {
    color: #e8e4dc;
}

.footer-copy {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #a99d90;
    font-size: 14px;
}

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

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

    .menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .header-search {
        display: none;
    }

    .hero-carousel {
        min-height: 560px;
        height: 72vh;
    }

    .hero-content {
        padding: 82px 0 74px;
    }

    .hero-copy p {
        font-size: 15px;
    }

    .section-head,
    .footer-inner {
        display: block;
    }

    .section-more {
        margin-top: 16px;
    }

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

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

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

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

    .footer-links {
        justify-content: flex-start;
        margin-top: 24px;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

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

    .hero-control {
        display: none;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-tags span,
    .detail-meta span,
    .movie-meta-line span {
        font-size: 11px;
    }

    .page-hero,
    .detail-hero,
    .detail-content {
        padding: 22px;
        border-radius: 18px;
    }

    .movie-grid,
    .hot-grid,
    .category-grid,
    .channel-grid {
        grid-template-columns: 1fr;
    }

    .hot-card {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .player-overlay strong {
        font-size: 16px;
    }
}
