:root {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-soft: #fff5f7;
    --text: #111827;
    --muted: #6b7280;
    --muted-light: #9ca3af;
    --line: #e5e7eb;
    --red: #dc2626;
    --pink: #db2777;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 45%, #fff1f2 100%);
}

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.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.brand-text,
.footer-brand span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong,
.footer-brand strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text small,
.footer-brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-nav-link {
    color: #374151;
    font-weight: 600;
    transition: 0.22s ease;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--red);
    background: #fff1f2;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #111827;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f9fafb;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--red);
    background: #fff1f2;
}

main {
    min-height: 60vh;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72)), linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 20px));
    right: 20px;
    bottom: 76px;
    max-width: 720px;
    color: #ffffff;
}

.hero-tags,
.detail-meta,
.movie-meta-line,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

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

.hero-tags span:first-child {
    background: linear-gradient(135deg, var(--red), var(--pink));
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 12px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.hero-one-line {
    margin: 0 0 10px;
    color: #f3f4f6;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 600;
}

.hero-summary {
    margin: 0;
    max-width: 620px;
    color: #d1d5db;
    line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.full-link,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-btn,
.quick-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.28);
}

.primary-btn {
    padding: 0 26px;
}

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

.primary-btn:hover,
.quick-search button:hover,
.section-more:hover,
.full-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: 0.22s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: 0.22s ease;
}

.hero-dot.active {
    width: 46px;
    background: #ffffff;
}

.search-strip {
    position: relative;
    z-index: 3;
    margin-top: -36px;
    padding: 0 20px;
}

.search-strip-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 20px;
    align-items: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.search-strip span,
.section-kicker,
.ranking-head span,
.category-overview-card span {
    display: inline-block;
    color: var(--red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.search-strip strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(20px, 2vw, 28px);
}

.quick-search,
.filter-bar {
    display: flex;
    gap: 12px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: 0.2s ease;
}

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

.quick-search button {
    flex: 0 0 100px;
    border: 0;
    cursor: pointer;
}

.content-section,
.detail-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 20px 0;
}

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

.section-head h2,
.ranking-head h2,
.movie-detail-card h1,
.page-hero h1 {
    margin: 8px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-head p,
.page-hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more,
.full-link {
    padding: 0 18px;
    color: var(--red);
    background: #fff1f2;
}

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: #e5e7eb;
    box-shadow: var(--soft-shadow);
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(220, 38, 38, 0.88);
    backdrop-filter: blur(8px);
}

.year-badge {
    right: 10px;
}

.rank-badge {
    left: 10px;
    background: rgba(17, 24, 39, 0.82);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: 0.24s ease;
}

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

.movie-card-body {
    padding: 12px 4px 0;
}

.movie-card-body h3 {
    margin: 0;
    min-height: 2.7em;
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-meta-line {
    margin: 8px 0;
    gap: 6px;
}

.movie-meta-line span {
    padding: 4px 7px;
    border-radius: 8px;
    color: #4b5563;
    font-size: 12px;
    background: #f3f4f6;
}

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

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

.category-card,
.category-overview-card a {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    border-radius: 22px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--soft-shadow);
}

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

.category-card::after,
.category-overview-card a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.category-card span,
.category-card p,
.category-overview-card div {
    position: relative;
    z-index: 2;
}

.category-card span,
.category-overview-card h2 {
    font-size: 22px;
    font-weight: 900;
}

.category-card p,
.category-overview-card p {
    margin: 10px 0 0;
    color: #e5e7eb;
    line-height: 1.6;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.two-column-section > div > .content-section {
    padding: 0;
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ranking-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: #f9fafb;
    transition: 0.2s ease;
}

.rank-row:hover {
    color: var(--red);
    background: #fff1f2;
}

.rank-num {
    grid-row: span 2;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--pink));
}

.rank-title {
    font-weight: 800;
}

.rank-info {
    color: var(--muted);
    font-size: 13px;
}

.full-link {
    width: 100%;
    margin-top: 18px;
}

.page-hero {
    margin: 0 auto;
    padding: 78px 20px 54px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 15%, rgba(244, 63, 94, 0.55), transparent 36%), linear-gradient(135deg, #111827, #7f1d1d 55%, #be123c);
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.compact-hero {
    min-height: 270px;
    display: flex;
    align-items: center;
}

.compact-hero p {
    max-width: 720px;
    color: #fee2e2;
}

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

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

.filter-bar {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.wide-filter {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
}

.movie-card.is-hidden {
    display: none;
}

.detail-shell {
    padding-top: 34px;
}

.detail-shell .breadcrumb {
    color: var(--muted);
}

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

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #030712;
    box-shadow: var(--shadow);
}

.movie-player,
.player-cover,
.player-cover img,
.player-cover-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 3;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000000;
}

.player-cover img {
    object-fit: cover;
}

.player-cover-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.66));
}

.player-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 30px;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.34);
    transform: translate(-50%, -50%);
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.movie-detail-card,
.side-info-card {
    margin-top: 22px;
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.movie-detail-card h1 {
    margin-top: 0;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-meta span,
.tag-list span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
    background: #f3f4f6;
}

.tag-list {
    margin-bottom: 24px;
}

.tag-list span:first-child {
    color: #991b1b;
    background: #fee2e2;
}

.movie-detail-card h2,
.side-info-card h2 {
    margin: 24px 0 12px;
    font-size: 22px;
}

.movie-detail-card p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

.detail-side {
    position: sticky;
    top: 92px;
}

.side-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.side-info-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
}

.side-info-card dt {
    color: var(--muted);
}

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

.related-section {
    padding-bottom: 72px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 20px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 30px;
}

.footer-brand strong,
.site-footer h3 {
    color: #ffffff;
}

.site-footer p,
.site-footer li,
.footer-bottom {
    color: #9ca3af;
    line-height: 1.8;
}

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

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
}

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

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .detail-side {
        position: static;
    }

    .detail-side {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 20px;
    }

    .side-info-card {
        margin-top: 0;
    }
}

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

    .menu-toggle {
        display: flex;
    }

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

    .hero-content {
        left: 20px;
        bottom: 70px;
    }

    .hero-arrow {
        display: none;
    }

    .search-strip-inner,
    .wide-filter {
        grid-template-columns: 1fr;
    }

    .quick-search,
    .filter-bar {
        flex-direction: column;
    }

    .quick-search button {
        flex: auto;
    }

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

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

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

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        display: none;
    }

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

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

    .hero-summary {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

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

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

    .content-section,
    .detail-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .movie-detail-card,
    .side-info-card {
        padding: 20px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
