:root {
    --brand: #b91c1c;
    --brand-dark: #7f1d1d;
    --brand-soft: #fee2e2;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --panel: #ffffff;
    --bg: #f8fafc;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

body {
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ffffff;
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.brand-copy {
    display: grid;
    line-height: 1.12;
}

.brand-copy strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand-copy em {
    margin-top: 3px;
    font-size: 12px;
    font-style: normal;
    color: #fecaca;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
    color: #fff1f2;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    opacity: 1;
}

.menu-toggle {
    display: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    flex-direction: column;
    gap: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav.open {
    display: flex;
}

.hero-wrap {
    background: #111827;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    max-width: none;
}

.hero-slide.active {
    display: flex;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 35%, rgba(239, 68, 68, 0.32), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.92) 0%, transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding-right: min(40vw, 480px);
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.88);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(185, 28, 28, 0.38);
}

.hero-content h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 76px);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.hero-content p {
    max-width: 680px;
    margin-top: 24px;
    color: #e5e7eb;
    font-size: clamp(17px, 2.1vw, 22px);
    line-height: 1.85;
}

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

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

.hero-tags span,
.tag-row span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.quick-search button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 13px;
    font-weight: 850;
    transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.primary-btn,
.quick-search button {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 18px 36px rgba(185, 28, 28, 0.28);
}

.primary-btn:hover,
.quick-search button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(185, 28, 28, 0.34);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.hero-poster {
    position: absolute;
    z-index: 3;
    right: max(48px, calc((100vw - 1180px) / 2));
    bottom: 82px;
    width: min(28vw, 320px);
    aspect-ratio: 3 / 4;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.24s ease, background 0.24s ease;
}

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

.quick-search-panel,
.content-section {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.quick-search-panel {
    margin-top: -38px;
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search {
    flex: 1;
    display: flex;
    gap: 12px;
}

.quick-search input,
.movie-filter-input,
.movie-kind-filter {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
}

.quick-search input,
.movie-filter-input {
    width: 100%;
    padding: 0 16px;
}

.movie-kind-filter {
    padding: 0 14px;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
    font-weight: 800;
}

.content-section {
    padding-top: 58px;
}

.soft-panel {
    margin-top: 58px;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.88));
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

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

.section-title h2 {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-title p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    min-height: 40px;
    color: #b91c1c;
    background: #fee2e2;
    white-space: nowrap;
}

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

.movie-card {
    min-width: 0;
}

.poster-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.poster-box {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.82) 100%);
    opacity: 0.88;
}

.play-mini {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.94);
    color: #ffffff;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.32);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(185, 28, 28, 0.96);
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
}

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

.movie-card-body h3 {
    overflow: hidden;
    display: -webkit-box;
    min-height: 44px;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-body p {
    overflow: hidden;
    display: -webkit-box;
    min-height: 46px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: #9f1239;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card .tag-row span {
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    padding: 5px 9px;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 24px;
    padding: 22px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.category-card img,
.category-card span {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-card img {
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-card span {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.06), rgba(127, 29, 29, 0.92));
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 22px;
    font-weight: 950;
}

.category-card em {
    margin-top: 8px;
    color: #fee2e2;
    font-size: 13px;
    font-style: normal;
    line-height: 1.7;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 34px;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 42px 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.list-rank {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    font-weight: 950;
}

.ranking-row img {
    width: 58px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.ranking-text {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.ranking-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.ranking-text em {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(248, 113, 113, 0.36), transparent 30%),
        linear-gradient(135deg, #7f1d1d 0%, #b91c1c 48%, #111827 100%);
}

.page-hero > div {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 82px 0;
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fee2e2;
    font-weight: 850;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin-top: 18px;
    color: #ffe4e6;
    font-size: 18px;
    line-height: 1.9;
}

.category-overview-card {
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.category-overview-link {
    display: grid;
    height: 100%;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 170px;
    background: #e5e7eb;
}

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

.category-overview-card div:last-child {
    padding: 20px;
}

.category-overview-card h2 {
    font-size: 22px;
    font-weight: 950;
}

.category-overview-card p {
    min-height: 70px;
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.75;
}

.category-overview-card span {
    display: inline-flex;
    margin-top: 14px;
    color: #b91c1c;
    font-weight: 900;
}

.filter-panel {
    padding-top: 34px;
}

.local-filter,
.search-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.search-toolbar .movie-filter-input,
.local-filter .movie-filter-input {
    flex: 1 1 300px;
}

.search-toolbar .movie-kind-filter,
.local-filter .movie-kind-filter {
    flex: 0 0 160px;
}

.detail-hero {
    width: min(1180px, calc(100% - 48px));
    margin: 42px auto 0;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 38px;
    align-items: center;
    padding: 32px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 88% 14%, rgba(248, 113, 113, 0.28), transparent 34%),
        linear-gradient(135deg, #111827 0%, #7f1d1d 100%);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 26px;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.36);
}

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

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

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

.detail-kicker {
    color: #fecaca;
    font-weight: 850;
}

.detail-intro h1 {
    margin-top: 12px;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1.08;
}

.detail-lead {
    max-width: 760px;
    margin-top: 18px;
    color: #f3f4f6;
    font-size: 18px;
    line-height: 1.9;
}

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

.detail-intro .primary-btn {
    margin-top: 30px;
}

.player-section {
    width: min(1180px, calc(100% - 48px));
    margin: 38px auto 0;
}

.player-section h2 {
    margin-bottom: 16px;
    font-size: 28px;
    font-weight: 950;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.68));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    font-size: 32px;
    box-shadow: 0 22px 50px rgba(185, 28, 28, 0.38);
}

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

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

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.text-panel {
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.text-panel h2 {
    font-size: 24px;
    font-weight: 950;
}

.text-panel p {
    margin-top: 14px;
    color: #334155;
    font-size: 16px;
    line-height: 2;
}

.search-results .movie-card.is-hidden,
.movie-grid .movie-card.is-hidden,
.ranking-row.is-hidden {
    display: none;
}

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-inner {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 38px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.footer-inner strong {
    color: #ffffff;
    font-size: 20px;
}

.footer-inner p {
    margin-top: 8px;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 800;
}

.footer-links a:hover {
    color: #ffffff;
}

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

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

    .hero-content {
        padding-right: 0;
    }

    .hero-poster {
        display: none;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        padding: 0 18px;
    }

    .brand-copy strong {
        font-size: 19px;
    }

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

    .hero-content {
        width: min(100% - 36px, 760px);
    }

    .hero-control {
        display: none;
    }

    .quick-search-panel {
        flex-direction: column;
        align-items: stretch;
        width: min(100% - 32px, 760px);
    }

    .quick-search {
        flex-direction: column;
    }

    .content-section {
        width: min(100% - 32px, 760px);
        padding-top: 42px;
    }

    .soft-panel {
        padding: 22px;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .split-layout .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .page-hero > div {
        width: min(100% - 32px, 760px);
        padding: 58px 0;
    }

    .detail-hero {
        width: min(100% - 32px, 760px);
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .detail-poster {
        width: min(260px, 100%);
        margin: 0 auto;
    }

    .player-section {
        width: min(100% - 32px, 760px);
    }

    .footer-inner {
        width: min(100% - 32px, 760px);
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .split-layout .movie-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .search-toolbar .movie-kind-filter,
    .local-filter .movie-kind-filter {
        flex: 1 1 100%;
    }
}
