:root {
    --red: #dc2626;
    --red-dark: #b91c1c;
    --orange: #ea580c;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --yellow: #facc15;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --dark: #111827;
    --max: 1180px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: #f3f4f6;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(var(--max), calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.3);
    font-size: 15px;
}

.brand-name {
    font-size: 25px;
    background: linear-gradient(90deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-dark .brand-name {
    color: #fff;
    background: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    font-weight: 700;
    color: #374151;
}

.nav-menu > a,
.nav-drop > a {
    padding: 22px 0;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--red);
}

.nav-drop {
    position: relative;
}

.nav-drop-panel {
    position: absolute;
    top: 100%;
    left: -18px;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 2px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-drop:hover .nav-drop-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
}

.nav-drop-panel a:hover {
    background: #fef2f2;
    color: var(--red);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-input,
.filter-select {
    width: 230px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #fff;
    transition: 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.top-search button,
.mobile-search button,
.primary-button,
.card-action,
.rank-play {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--blue);
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.card-action:hover,
.rank-play:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    padding: 10px;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #111827;
    border-radius: 8px;
}

.mobile-panel {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    display: grid;
    gap: 12px;
}

.mobile-panel[hidden] {
    display: none;
}

.mobile-panel a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

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

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

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

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
}

.hero-content {
    width: min(var(--max), calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

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

.hero-label,
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 15px;
    color: #fff;
    background: linear-gradient(90deg, var(--red), var(--orange));
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.3);
}

.hero h1,
.hero h2 {
    margin: 18px 0 14px;
    font-size: clamp(40px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2.1vw, 22px);
}

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

.hero-meta span,
.detail-meta span,
.rank-meta span,
.movie-meta span {
    color: inherit;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
}

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

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
    backdrop-filter: blur(10px);
    transition: 0.2s ease;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transform: translateY(-50%);
    transition: 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

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

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.25s ease;
}

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

.section,
.page-hero,
.detail-section {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: "";
    width: 5px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--red), var(--orange));
}

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

.section-lead,
.page-hero p,
.detail-copy p {
    color: var(--muted);
    font-size: 17px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-card.tall .movie-poster {
    aspect-ratio: 3 / 4;
}

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

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

.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #111827;
    background: var(--yellow);
    font-size: 13px;
    font-weight: 900;
}

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

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.movie-tags span {
    color: var(--red);
    background: #fef2f2;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.movie-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

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

.movie-card p {
    min-height: 52px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    color: #6b7280;
    margin-bottom: 16px;
}

.movie-meta span {
    color: #4b5563;
    background: #f3f4f6;
    border-color: #f3f4f6;
}

.card-action,
.rank-play {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.alt-band {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.dark-band {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
}

.dark-band .section h2,
.dark-band .section-title,
.dark-band h2 {
    color: #fff;
}

.dark-band .section-lead {
    color: rgba(255, 255, 255, 0.72);
}

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

.compact-card {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

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

.compact-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.88));
}

.compact-info {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    color: #fff;
}

.compact-info strong,
.compact-info em {
    display: block;
}

.compact-info strong {
    font-size: 16px;
    line-height: 1.28;
}

.compact-info em {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
    font-size: 13px;
}

.feature-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.horizontal-list {
    display: grid;
    gap: 14px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 16px;
    align-items: center;
    border-radius: 18px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.horizontal-card img {
    width: 132px;
    height: 88px;
    object-fit: cover;
    border-radius: 14px;
}

.horizontal-card h3 {
    margin: 0 0 7px;
    font-size: 18px;
}

.horizontal-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.purple-panel {
    border-radius: 32px;
    padding: 34px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    box-shadow: var(--shadow);
}

.purple-panel h2 {
    margin: 0 0 20px;
    font-size: clamp(28px, 4vw, 42px);
}

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

.category-tile {
    min-height: 156px;
    border-radius: 24px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.96), rgba(234, 88, 12, 0.92));
    box-shadow: 0 16px 35px rgba(220, 38, 38, 0.18);
    transition: 0.22s ease;
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #111827, #4b5563);
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.category-tile span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.page-hero {
    padding-top: 46px;
    padding-bottom: 32px;
}

.page-hero-card {
    border-radius: 32px;
    padding: 42px;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.22), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 58%, #c2410c);
    box-shadow: var(--shadow);
}

.page-hero-card h1,
.page-hero-card p {
    color: #fff;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 0;
}

.filter-input {
    width: min(420px, 100%);
}

.filter-select {
    width: 180px;
    border-radius: 14px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 72px 108px 1fr auto;
    align-items: center;
    gap: 18px;
    border-radius: 20px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
}

.rank-number {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

.rank-cover img {
    width: 108px;
    height: 74px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-copy h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-copy p {
    margin: 0 0 10px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-meta span {
    color: #4b5563;
    background: #f3f4f6;
    border-color: #f3f4f6;
}

.detail-hero {
    background: linear-gradient(135deg, #0f172a, #111827 55%, #7f1d1d);
    color: #fff;
}

.detail-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 54px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.65fr);
    gap: 34px;
    align-items: center;
}

.breadcrumbs {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #fff;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.32);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    z-index: 3;
}

.video-shell.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon-large {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 20px 42px rgba(220, 38, 38, 0.38);
    font-size: 30px;
    padding-left: 4px;
}

.detail-copy h1 {
    color: #fff;
    margin-bottom: 16px;
}

.detail-copy p {
    color: rgba(255, 255, 255, 0.82);
}

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

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.article-panel,
.side-panel {
    border-radius: 24px;
    padding: 26px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-panel p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 16px;
}

.info-list {
    display: grid;
    gap: 10px;
}

.info-list div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    color: #374151;
}

.info-list strong {
    color: var(--text);
}

.related-mini {
    display: grid;
    gap: 12px;
}

.related-mini a {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
}

.related-mini img {
    width: 76px;
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
}

.related-mini strong {
    display: block;
    line-height: 1.3;
}

.related-mini span {
    color: var(--muted);
    font-size: 13px;
}

.search-panel {
    border-radius: 28px;
    padding: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #030712);
}

.footer-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
}

.footer-brand p {
    max-width: 360px;
    color: #9ca3af;
}

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

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

.footer-column a {
    color: #d1d5db;
}

.footer-column a:hover {
    color: #f87171;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 16px;
    text-align: center;
    color: #9ca3af;
}

@media (max-width: 1024px) {
    .top-search {
        display: none;
    }

    .movie-grid,
    .movie-grid.four,
    .compact-grid,
    .category-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-shell,
    .detail-section-grid,
    .feature-panel,
    .footer-shell {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .nav-shell {
        height: 62px;
    }

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

    .nav-menu {
        display: none;
    }

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .mobile-search input {
        width: 100%;
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 76px;
    }

    .hero-layer {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.88));
    }

    .hero-arrow {
        display: none;
    }

    .section,
    .page-hero,
    .detail-section {
        padding: 38px 0;
    }

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

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

    .ranking-row {
        grid-template-columns: 46px 86px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        font-size: 13px;
    }

    .rank-cover img {
        width: 86px;
        height: 60px;
    }

    .rank-play {
        grid-column: 1 / -1;
        width: 100%;
    }

    .detail-shell {
        padding: 28px 0 40px;
    }

    .page-hero-card,
    .purple-panel,
    .article-panel,
    .side-panel {
        padding: 24px;
        border-radius: 22px;
    }

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

    .horizontal-card img {
        width: 104px;
        height: 76px;
    }
}
