:root {
    --bg: #f8f6f2;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(28, 25, 23, 0.1);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
}

.brand-icon svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-text small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #57534e;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary);
    background: #fee2e2;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: #f5f5f4;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #44403c;
    border-radius: 2px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 34%, rgba(248, 113, 113, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(28, 25, 23, 0.82) 42%, rgba(28, 25, 23, 0.34) 100%),
        linear-gradient(0deg, rgba(12, 10, 9, 0.62), rgba(12, 10, 9, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 54px;
    padding: 70px 0;
}

.hero-copy {
    max-width: 780px;
    color: #fff;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fecaca;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--primary);
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.03;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 850;
}

.hero-desc {
    max-width: 650px;
    color: #f5f5f4;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-pager,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn,
.home-search button,
.small-play,
.text-link,
.section-more,
.detail-pager a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover,
.home-search button:hover,
.small-play:hover,
.text-link:hover,
.section-more:hover,
.detail-pager a:hover {
    transform: translateY(-2px);
}

.btn.primary,
.home-search button,
.small-play {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.32);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.btn.subtle {
    background: #fff7ed;
    color: #9a3412;
}

.btn.ghost-light,
.detail-pager a {
    background: #fff;
    color: var(--primary);
    border: 1px solid #fecaca;
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.52);
    aspect-ratio: 2 / 3;
    background: #1c1917;
}

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

.hero-poster span,
.poster-play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.hero-poster span {
    left: 50%;
    top: 50%;
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%);
    font-size: 30px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
}

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

.quick-search {
    position: relative;
    margin-top: -54px;
    z-index: 4;
}

.quick-search-inner,
.spotlight-card,
.text-panel,
.side-card,
.category-card,
.filter-panel,
.movie-card,
.rank-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(231, 229, 228, 0.88);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quick-search-inner {
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    gap: 20px;
    align-items: center;
}

.quick-search h2,
.section-head h2,
.page-title h1,
.spotlight-card h2,
.detail-content h1,
.text-panel h2,
.side-card h2,
.category-card h2 {
    margin: 0;
    letter-spacing: -0.04em;
    color: var(--text);
}

.quick-search h2 {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.18;
}

.home-search,
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-search input,
.search-box input,
.filter-panel select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fafaf9;
    color: var(--text);
    outline: none;
}

.home-search input,
.search-box input {
    padding: 0 16px;
}

.home-search input:focus,
.search-box input:focus,
.filter-panel select:focus {
    border-color: #fca5a5;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.16);
}

.home-search button {
    border: 0;
    min-width: 92px;
}

.category-pills {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pills a {
    padding: 9px 13px;
    border-radius: 999px;
    background: #f5f5f4;
    color: #57534e;
    font-size: 14px;
    font-weight: 800;
}

.category-pills a:hover {
    background: #fee2e2;
    color: var(--primary);
}

.page-section,
.page-main {
    padding: 62px 0;
}

.page-main {
    min-height: 70vh;
}

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

.section-head p {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

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

.section-more,
.text-link {
    color: var(--primary);
    background: #fee2e2;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 55px rgba(28, 25, 23, 0.15);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #1c1917;
}

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

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

.poster-year {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
}

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

.movie-meta {
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta a {
    color: var(--primary);
}

.movie-card h3,
.rank-info h3 {
    margin: 8px 0 7px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card p,
.rank-info p,
.category-card p,
.page-title p,
.spotlight-card p,
.text-panel p,
.footer-grid p,
.lead {
    color: #57534e;
    line-height: 1.75;
}

.movie-card p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span,
.detail-tags span,
.detail-meta span {
    background: #f5f5f4;
    color: #57534e;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.spotlight-card {
    padding: 28px;
    align-self: start;
    background: linear-gradient(160deg, #fff 0%, #fff7ed 62%, #fee2e2 100%);
}

.spotlight-card h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 54px 80px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.rank-index {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #1c1917;
    color: #fff;
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 80px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #1c1917;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin-top: 0;
}

.rank-info p {
    margin: 0 0 8px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-channel {
    margin-bottom: 56px;
}

.page-title {
    margin-bottom: 32px;
}

.page-title h1 {
    max-width: 900px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.1;
}

.page-title p {
    max-width: 860px;
    font-size: 17px;
}

.channel-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

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

.category-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
}

.category-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #1c1917;
}

.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card h2 {
    font-size: 26px;
}

.category-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.category-sample a {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f5f5f4;
    color: #57534e;
    font-size: 13px;
    font-weight: 700;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    padding: 14px;
    margin-bottom: 24px;
}

.search-box {
    position: relative;
}

.search-box span {
    position: absolute;
    left: 15px;
    color: var(--muted);
}

.search-box input {
    padding-left: 38px;
}

.filter-panel select {
    padding: 0 14px;
}

.empty-message {
    display: none;
    margin: 28px 0 0;
    padding: 28px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.empty-message.is-visible {
    display: block;
}

.detail-main {
    background: #f8f6f2;
}

.player-section {
    padding: 30px 0;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.28), transparent 38%),
        linear-gradient(180deg, #0c0a09 0%, #1c1917 100%);
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    color: #fff;
    font-size: 38px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 38px;
}

.detail-content,
.detail-side {
    min-width: 0;
}

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

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

.detail-content h1 {
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.1;
}

.detail-meta {
    margin: 18px 0;
}

.lead {
    margin: 0 0 18px;
    font-size: 18px;
}

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

.text-panel,
.side-card {
    padding: 24px;
    margin-bottom: 20px;
}

.text-panel h2,
.side-card h2 {
    font-size: 26px;
    margin-bottom: 12px;
}

.text-panel p {
    margin: 0 0 14px;
    font-size: 16px;
}

.side-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #1c1917;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.side-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.detail-pager {
    margin: 28px 0;
}

.site-footer {
    margin-top: 70px;
    background: #1c1917;
    color: #e7e5e4;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 42px 0;
}

.footer-grid p {
    max-width: 560px;
    color: #a8a29e;
}

.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f4;
    font-weight: 800;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px;
    color: #a8a29e;
    text-align: center;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

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

    .hero-poster {
        display: none;
    }

    .detail-side {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        min-height: 64px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        border-radius: 12px;
    }

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

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

    .hero-desc {
        font-size: 16px;
    }

    .quick-search {
        margin-top: 0;
    }

    .quick-search-inner,
    .filter-panel,
    .footer-grid,
    .channel-title,
    .rank-card,
    .category-card,
    .detail-side {
        grid-template-columns: 1fr;
    }

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

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

    .rank-card {
        display: grid;
        grid-template-columns: 42px 72px minmax(0, 1fr);
    }

    .rank-card .small-play {
        grid-column: 2 / -1;
    }

    .detail-content h1,
    .page-title h1 {
        font-size: 32px;
    }

    .text-panel,
    .side-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .container,
    .site-header-inner {
        width: min(100% - 24px, 1180px);
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        display: none;
    }

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

    .rank-card {
        grid-template-columns: 38px 68px minmax(0, 1fr);
        gap: 10px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}
