:root {
    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-soft: #fee2e2;
    --blue: #2563eb;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --page: #f9fafb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--page);
    line-height: 1.65;
}

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

img,
video {
    display: block;
    max-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: 80;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-main {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--red);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.32);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
    color: #374151;
}

.nav-links a,
.header-strip a,
.mobile-panel a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.header-strip a:hover,
.header-strip a.is-active,
.mobile-panel a:hover {
    color: var(--red);
}

.header-search {
    width: 260px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 18px;
    background: #f3f4f6;
    border-radius: 999px;
    border: 1px solid transparent;
}

.header-search:focus-within {
    border-color: #fecaca;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
}

.header-search button,
.mobile-toggle {
    border: 0;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    font-size: 26px;
}

.header-strip {
    border-top: 1px solid #f3f4f6;
}

.header-strip-inner {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 9px 0 10px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.mobile-panel {
    display: none;
    padding: 0 0 16px;
    border-top: 1px solid #f3f4f6;
}

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

.mobile-panel .header-search {
    width: 100%;
    margin: 16px 0;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    color: #374151;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 620px;
    color: #ffffff;
    background: #030712;
    overflow: hidden;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transform: scale(1.035);
}

.hero-fade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 35%, rgba(239, 68, 68, 0.25), transparent 34%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.90), transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
    padding: 86px 0 92px;
}

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

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #ffffff;
    background: var(--red);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.badge.light {
    color: #991b1b;
    background: #fee2e2;
}

.badge.dark {
    background: rgba(17, 24, 39, 0.78);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    max-width: 820px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.06;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 660px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.hero-meta,
.movie-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.hero-actions,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 0;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #ffffff;
    background: var(--red);
    box-shadow: 0 18px 32px rgba(220, 38, 38, 0.35);
}

.btn.primary:hover {
    background: var(--red-dark);
}

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

.btn.soft {
    color: var(--red);
    background: #fff1f2;
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-nav.prev {
    left: 20px;
}

.hero-nav.next {
    right: 20px;
}

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

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

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

.page-hero {
    padding: 66px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 22%, rgba(248, 113, 113, 0.42), transparent 26%),
        linear-gradient(135deg, #991b1b, #111827 70%);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

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

main {
    min-height: 56vh;
}

.section {
    padding: 44px 0;
}

.section.compact {
    padding: 28px 0;
}

.section-panel {
    margin: 44px 0;
    padding: 32px;
    border-radius: 26px;
    background: linear-gradient(135deg, #fff1f2, #ffffff 52%, #eff6ff);
    box-shadow: var(--shadow);
}

.section h2,
.section-title {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.16;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.90);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #fecaca;
    box-shadow: var(--shadow);
}

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

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

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

.poster-tag,
.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 10px 0 0;
    overflow: hidden;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 155px 1fr;
}

.movie-card.horizontal .poster-link {
    aspect-ratio: auto;
    min-height: 220px;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    color: #ffffff;
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
    transition: transform 0.35s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 70%);
}

.category-card-content {
    position: relative;
    z-index: 2;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.82);
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 26px 0 28px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    outline: 0;
    background: #f9fafb;
    padding: 0 16px;
}

.filter-bar input {
    flex: 1 1 260px;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #fecaca;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 82px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

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

.rank-thumb {
    width: 82px;
    height: 108px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 950;
}

.rank-row p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #6b7280;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.breadcrumbs {
    padding: 18px 0;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumbs a {
    color: #374151;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
    padding-bottom: 46px;
}

.player-card,
.detail-card,
.side-card {
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.20);
}

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

.player-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
}

.player-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.14));
}

.play-button {
    position: relative;
    z-index: 3;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.94);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.42);
    cursor: pointer;
}

.play-button span {
    margin-left: 5px;
    font-size: 34px;
    line-height: 1;
}

.player-info,
.detail-card,
.side-card {
    padding: 24px;
}

.player-info h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    margin: 0 0 14px;
    color: #6b7280;
    font-weight: 800;
}

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

.detail-card p {
    margin: 0 0 16px;
    color: #374151;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-list span,
.tag-list a {
    padding: 5px 10px;
    color: #991b1b;
    background: #fee2e2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

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

.side-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 70px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
}

.side-item h3 {
    display: -webkit-box;
    margin: 0 0 5px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-item p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.hidden-by-filter {
    display: none !important;
}

.site-footer {
    margin-top: 30px;
    padding: 34px 0;
    color: #d1d5db;
    background: #111827;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #f3f4f6;
    font-weight: 700;
}

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

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

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

    .header-search {
        width: 220px;
    }
}

@media (max-width: 820px) {
    .nav-links,
    .header-main > .header-search,
    .header-strip {
        display: none;
    }

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

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

    .hero-content {
        padding: 72px 0 84px;
    }

    .hero-nav {
        display: none;
    }

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

    .movie-card.horizontal {
        grid-template-columns: 120px 1fr;
    }

    .movie-card.horizontal .poster-link {
        min-height: 180px;
    }

    .rank-row {
        grid-template-columns: 44px 66px 1fr;
    }

    .rank-row .btn {
        grid-column: 3;
        justify-self: start;
    }

    .rank-thumb {
        width: 66px;
        height: 88px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .brand {
        font-size: 19px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

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

    .hero h1,
    .hero h2 {
        font-size: 36px;
    }

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

    .section-panel,
    .player-info,
    .detail-card,
    .side-card {
        padding: 18px;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .card-title {
        min-height: 42px;
        font-size: 15px;
    }

    .movie-card.horizontal {
        grid-template-columns: 105px 1fr;
    }

    .movie-card.horizontal .poster-link {
        min-height: 154px;
    }

    .rank-row {
        grid-template-columns: 38px 58px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .rank-num {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 14px;
    }

    .rank-thumb {
        width: 58px;
        height: 78px;
    }

    .play-button {
        width: 70px;
        height: 70px;
    }
}
