:root {
    --red: #dc2626;
    --red-dark: #b91c1c;
    --dark: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--soft);
    color: #1f2937;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(16px);
}

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

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    color: #374151;
    font-weight: 600;
}

.desktop-nav a,
.nav-dropdown button {
    padding: 10px 0;
    color: #374151;
    border: 0;
    background: transparent;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
    color: var(--red);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: -18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 330px;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
}

.dropdown-panel a:hover {
    background: #fef2f2;
}

.site-search {
    display: flex;
    align-items: center;
    width: 240px;
    margin-left: 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.site-search input {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    outline: 0;
}

.site-search button,
.large-search button {
    padding: 10px 14px;
    border: 0;
    color: #fff;
    background: var(--red);
    cursor: pointer;
}

.site-search button:hover,
.large-search button:hover {
    background: var(--red-dark);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
}

.mobile-panel {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 16px 20px;
    border-top: 1px solid var(--line);
    background: #fff;
}

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

.mobile-panel a {
    padding: 11px 12px;
    border-radius: 12px;
    background: #f9fafb;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000;
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: end;
    gap: 40px;
    padding-bottom: 74px;
    color: #fff;
}

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

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--red);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-label {
    padding: 6px 12px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    border-radius: 999px;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: #e5e7eb;
    font-size: 20px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    color: #fff;
    background: rgba(17, 24, 39, 0.7);
    border-radius: 999px;
    font-size: 14px;
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.primary-button,
.ghost-button,
.soft-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-button {
    color: #fff;
    background: var(--red);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.primary-button:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.hero-cats a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #f9fafb;
    background: rgba(255, 255, 255, 0.12);
}

.hero-side {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(18px);
}

.hero-side h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
}

.hero-mini-card:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero-mini-card img {
    width: 64px;
    height: 82px;
    object-fit: cover;
    border-radius: 10px;
}

.hero-mini-card span {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

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

.section-block {
    padding: 56px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-main h1 {
    margin: 4px 0 0;
    color: var(--dark);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head a,
.text-link {
    color: var(--red);
    font-weight: 800;
}

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

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

.movie-card:hover .poster-link img,
.wide-card:hover img,
.rank-hero-card:hover img {
    transform: scale(1.08);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 34px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.38);
    transition: opacity 0.22s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    color: #fff;
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.94);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    right: 10px;
    left: auto;
    background: rgba(0, 0, 0, 0.72);
}

.card-body h2 {
    margin: 12px 0 4px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body h2 a:hover {
    color: var(--red);
}

.card-meta,
.card-desc,
.wide-card p,
.category-overview-card p,
.page-hero p,
.content-card p,
.info-card dd,
.site-footer p {
    color: var(--muted);
}

.card-meta,
.card-desc {
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    margin-top: 4px;
}

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

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

.wide-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

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

.wide-poster span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    background: rgba(0, 0, 0, 0.26);
}

.wide-card h2 {
    margin: 12px 0 5px;
    font-size: 18px;
}

.category-band {
    padding-top: 32px;
}

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

.category-tile,
.category-overview-card,
.content-card,
.info-card,
.filter-bar,
.rank-hero-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-tile {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    transition: 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-tile span {
    color: var(--dark);
    font-size: 21px;
    font-weight: 900;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
}

.page-hero {
    padding: 70px 0;
    background: linear-gradient(135deg, #ffffff, #f3f4f6);
    border-bottom: 1px solid var(--line);
}

.red-hero {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.dark-hero {
    color: #fff;
    background: linear-gradient(135deg, #111827, #3f0d0d);
}

.red-hero h1,
.red-hero p,
.dark-hero h1,
.dark-hero p {
    color: #fff;
}

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

.breadcrumb a:hover {
    color: var(--red);
}

.category-overview-card {
    overflow: hidden;
}

.category-cover-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 160px;
    overflow: hidden;
    background: #111827;
}

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

.category-overview-card div {
    padding: 22px;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    color: var(--dark);
    font-size: 22px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
    padding: 16px;
}

.filter-bar input,
.large-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
}

.filter-bar input:focus,
.large-search input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.filter-bar a {
    color: var(--red);
    font-weight: 800;
}

.large-search {
    display: flex;
    width: min(720px, 100%);
    margin-top: 28px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.large-search input {
    border-radius: 0;
    border: 0;
}

.large-search button {
    min-width: 110px;
}

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

.rank-hero-card {
    overflow: hidden;
}

.rank-hero-card a {
    position: relative;
    display: block;
    min-height: 360px;
    color: #fff;
    background: #111827;
}

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

.rank-hero-card div {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), transparent);
}

.rank-hero-card span {
    color: #fca5a5;
    font-weight: 900;
}

.rank-hero-card h2 {
    margin: 8px 0;
    font-size: 24px;
}

.rank-hero-card p {
    margin: 0;
    color: #e5e7eb;
}

.player-top {
    background: #050505;
    padding: 24px 0 42px;
}

.player-top .breadcrumb {
    color: #d1d5db;
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: #f9fafb;
    font-weight: 800;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

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

.big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    padding-left: 6px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.35);
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.player-shell.is-playing .big-play {
    opacity: 0;
    pointer-events: none;
}

.control-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.control-bar button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.progress {
    flex: 1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--red);
}

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

.detail-main h1 {
    margin-bottom: 18px;
}

.detail-main .detail-meta span {
    color: #374151;
    background: #f3f4f6;
}

.soft-button {
    border: 0;
    color: #374151;
    background: #f3f4f6;
    cursor: pointer;
}

.soft-button:hover {
    color: #fff;
    background: var(--red);
}

.content-card,
.info-card {
    margin-top: 22px;
    padding: 26px;
}

.content-card h2,
.info-card h2 {
    margin: 0 0 14px;
    color: var(--dark);
    font-size: 22px;
}

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

.content-card p:last-child {
    margin-bottom: 0;
}

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

.info-card {
    position: sticky;
    top: 94px;
}

.info-card dl {
    margin: 0;
}

.info-card div {
    display: flex;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.info-card dt {
    width: 64px;
    color: #6b7280;
}

.info-card dd {
    margin: 0;
    font-weight: 700;
}

.tag-cloud {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
    margin-top: 16px;
    padding: 0 !important;
    border-bottom: 0 !important;
}

.tag-cloud span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-size: 13px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

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

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin: 8px 0;
}

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 18px;
    color: #9ca3af;
    border-top: 1px solid #1f2937;
    text-align: center;
}

.is-hidden {
    display: none !important;
}

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

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

    .hero-side {
        display: none;
    }
}

@media (max-width: 900px) {
    .desktop-nav,
    .site-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 70px;
    }

    .hero p {
        font-size: 17px;
    }

    .wide-grid,
    .category-grid,
    .category-overview-grid,
    .rank-hero-grid,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .info-card {
        position: static;
    }
}

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

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

    .brand-name {
        font-size: 18px;
    }

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

    .section-block {
        padding: 38px 0;
    }

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

    .hero {
        height: 520px;
    }

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

    .hero-meta {
        gap: 8px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        max-width: 260px;
    }

    .hero-cats a {
        font-size: 13px;
    }

    .filter-bar,
    .large-search {
        align-items: stretch;
        flex-direction: column;
    }

    .large-search button {
        min-height: 46px;
    }

    .player-top {
        padding-top: 16px;
    }

    .player-shell {
        border-radius: 12px;
    }

    .big-play {
        width: 68px;
        height: 68px;
    }

    .control-bar {
        gap: 8px;
        padding: 12px;
    }

    .content-card,
    .info-card {
        padding: 20px;
    }
}
