:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-2: #0b1220;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.2);
    --red: #dc2626;
    --red-light: #ef4444;
    --orange: #f97316;
    --blue: #2563eb;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, #0f172a 0%, #111827 42%, #0f172a 100%);
    color: var(--text);
}

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

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav-inner {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
    font-size: 14px;
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 700;
    font-size: 15px;
    padding: 23px 0 20px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ef4444;
    border-bottom-color: #ef4444;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    cursor: pointer;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    background: #e5e7eb;
    display: block;
    margin: 5px auto;
}

.mobile-menu {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid var(--line);
}

.mobile-menu.open {
    display: grid;
    gap: 4px;
}

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

.mobile-link.active {
    color: #ef4444;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 590px;
    background: linear-gradient(110deg, #7f1d1d, #991b1b 45%, #9a3412);
}

.hero-home {
    min-height: 670px;
}

.small-hero,
.category-hero {
    min-height: 330px;
}

.hero-bg,
.detail-bg,
.category-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.24;
    transform: scale(1.03);
}

.hero-shade,
.detail-mask,
.category-card-mask {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 36%, rgba(248, 113, 113, 0.22), transparent 32%), linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(127, 29, 29, 0.7) 55%, rgba(15, 23, 42, 0.7));
}

.hero-content {
    position: relative;
    max-width: 1180px;
    min-height: 590px;
    margin: 0 auto;
    padding: 72px 22px 120px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 54px;
}

.hero-content.simple {
    min-height: 330px;
    display: flex;
    align-items: center;
    padding-bottom: 72px;
}

.hero-copy h1,
.hero-content.simple h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content.simple h1 {
    font-size: clamp(38px, 5vw, 58px);
}

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

.hero-desc {
    max-width: 780px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.7;
}

.hero-movie {
    max-width: 760px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.hero-movie span,
.hero-movie strong,
.hero-movie em {
    display: block;
}

.hero-movie span {
    color: #fed7aa;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-movie strong {
    font-size: 28px;
    margin-bottom: 8px;
}

.hero-movie em {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    line-height: 1.6;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
    min-height: 52px;
    padding: 0 28px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 14px 32px rgba(220, 38, 38, 0.35);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    min-height: 52px;
    padding: 0 28px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(10px);
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
    aspect-ratio: 3 / 4.15;
}

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

.hero-poster span,
.play-float {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    font-size: 24px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.36);
}

.hero-strip {
    position: relative;
    max-width: 1180px;
    margin: -92px auto 0;
    padding: 0 22px 34px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.content-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 76px 22px;
}

.inner-section {
    padding-top: 76px;
    padding-bottom: 76px;
}

.wide-section {
    width: 100%;
}

.dark-band {
    background: linear-gradient(90deg, #1e293b, #111827);
}

.blue-band {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.section-more {
    color: #f87171;
    white-space: nowrap;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(248, 113, 113, 0.45);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: #0b1220;
}

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

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

.badge {
    position: absolute;
    top: 14px;
    z-index: 2;
    padding: 7px 11px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(10px);
}

.badge-left {
    left: 14px;
    background: rgba(220, 38, 38, 0.92);
}

.badge-right {
    right: 14px;
}

.play-float {
    opacity: 0;
    transform: scale(0.78);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-float {
    opacity: 1;
    transform: scale(1);
}

.card-body {
    padding: 22px;
}

.card-body h2,
.compact-card h3,
.ranking-main h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    line-height: 1.35;
}

.meta-line,
.ranking-meta {
    color: var(--muted);
    font-size: 13px;
    margin: 9px 0 12px;
}

.card-desc,
.ranking-main p,
.article-panel p,
.player-card p {
    color: #cbd5e1;
    line-height: 1.72;
}

.card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    margin: 0 0 16px;
    font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(30, 41, 59, 0.95);
    transform: translateY(-3px);
}

.compact-poster {
    position: relative;
    height: 86px;
    border-radius: 14px;
    overflow: hidden;
}

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

.compact-card h3 {
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.rank-num {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: #fff;
    font-weight: 900;
    font-size: 13px;
}

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

.category-tile,
.category-card {
    position: relative;
    min-height: 154px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(249, 115, 22, 0.82));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.category-tile {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.category-tile span,
.category-card-content span {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 900;
}

.category-tile strong,
.category-card-content h2 {
    color: #fff;
    font-size: 26px;
    margin-top: 8px;
}

.tile-gangtai,
.tile-variety {
    background: linear-gradient(135deg, #7e22ce, #db2777);
}

.tile-rihan,
.tile-series {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.tile-oumei,
.tile-movie {
    background: linear-gradient(135deg, #16a34a, #0f766e);
}

.tile-asia,
.tile-animation {
    background: linear-gradient(135deg, #9333ea, #2563eb);
}

.tile-global {
    background: linear-gradient(135deg, #475569, #0f172a);
}

.category-card {
    min-height: 250px;
}

.category-card-bg {
    opacity: 0.42;
}

.category-card-mask {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.94));
}

.category-card-content {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
}

.category-card-content p {
    margin: 10px 0 0;
    color: #cbd5e1;
    line-height: 1.55;
}

.recommend-box,
.player-card,
.article-panel,
.related-panel {
    margin-top: 42px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(30, 41, 59, 0.78);
    padding: 28px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

.recommend-box h2 {
    margin: 0 0 22px;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: auto 132px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-3px);
    background: rgba(30, 41, 59, 0.96);
}

.ranking-row img {
    width: 132px;
    height: 100px;
    object-fit: cover;
    border-radius: 16px;
}

.ranking-index {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.row-action {
    padding: 10px 16px;
    color: #fff;
    background: rgba(220, 38, 38, 0.86);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 160px 160px auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    margin-bottom: 32px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.76);
}

.filter-input {
    position: relative;
}

.filter-input span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.95);
    color: #fff;
    padding: 0 14px;
    outline: none;
}

.filter-input input {
    padding-left: 42px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(248, 113, 113, 0.75);
}

.view-actions {
    display: inline-flex;
    gap: 8px;
}

.view-btn {
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    cursor: pointer;
    font-weight: 800;
}

.view-btn.active {
    background: #dc2626;
    color: #fff;
}

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

.filter-grid.view-list .movie-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    flex-direction: row;
}

.filter-grid.view-list .poster-wrap {
    height: 100%;
    min-height: 190px;
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 22px;
}

.search-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
}

.search-entry h2 {
    margin: 0 0 12px;
    font-size: 34px;
}

.search-entry p {
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background: #0f172a;
}

.detail-layout {
    position: relative;
    max-width: 1180px;
    min-height: 560px;
    margin: 0 auto;
    padding: 68px 22px;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 44px;
    align-items: center;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
    aspect-ratio: 3 / 4.2;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: #cbd5e1;
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumb a {
    color: #fca5a5;
}

.detail-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.detail-one {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.75;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 16px;
}

.detail-meta span {
    padding: 9px 13px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-content {
    padding-top: 44px;
}

.video-shell {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-overlay span {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    font-size: 30px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.player-overlay.is-hidden {
    display: none;
}

.player-card h2,
.article-panel h2 {
    margin: 24px 0 12px;
    font-size: 28px;
}

.article-panel h2:first-child {
    margin-top: 0;
}

.site-footer {
    background: linear-gradient(180deg, #111827, #020617);
    border-top: 1px solid var(--line);
    color: #cbd5e1;
}

.footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 22px 34px;
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1.1fr;
    gap: 34px;
}

.footer-grid h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

.footer-grid p {
    margin: 14px 0 0;
    color: #94a3b8;
    line-height: 1.7;
}

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

.footer-grid a:hover {
    color: #ef4444;
}

.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 22px 32px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #64748b;
    text-align: center;
}

[hidden],
.movie-card.filtered-out {
    display: none !important;
}

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

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

    .hero-content {
        grid-template-columns: 1fr;
        padding-bottom: 140px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .mobile-toggle {
        display: block;
    }

    .brand-text {
        font-size: 20px;
    }

    .hero,
    .hero-home {
        min-height: auto;
    }

    .hero-content,
    .hero-content.simple {
        min-height: auto;
        padding-top: 56px;
        padding-bottom: 80px;
    }

    .hero-copy h1,
    .hero-content.simple h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-strip,
    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-card-grid,
    .recommend-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-strip {
        margin-top: -50px;
    }

    .content-section {
        padding: 52px 18px;
    }

    .section-head,
    .search-entry {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .ranking-row img {
        width: 100%;
        height: 190px;
    }

    .row-action {
        width: fit-content;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        padding-top: 42px;
    }

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

    .player-card,
    .article-panel,
    .related-panel,
    .recommend-box {
        padding: 20px;
        border-radius: 20px;
    }
}
