:root {
    color-scheme: light;
    --bg: #f9fafb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --pink: #db2777;
    --purple: #7c3aed;
    --blue: #2563eb;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 0;
}

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

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

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

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

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

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    min-width: 300px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 14px;
    background: transparent;
}

.nav-search button,
.wide-search button,
.search-fields button {
    border: 0;
    color: #fff;
    background: var(--red);
    padding: 11px 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.wide-search button:hover,
.search-fields button:hover {
    background: var(--red-dark);
}

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

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
}

.mobile-categories a,
.category-strip a,
.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    color: #4b5563;
    font-size: 13px;
    padding: 6px 12px;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 26px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.12)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 78px);
    bottom: clamp(36px, 8vw, 90px);
    width: min(640px, calc(100% - 48px));
    color: #fff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    color: #fecaca;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
    margin: 12px 0 16px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.02;
    font-weight: 900;
}

.hero-content p,
.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.category-enter,
.panel-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.category-enter,
.panel-link {
    color: #fff;
    background: var(--red);
}

.primary-button:hover,
.category-enter:hover,
.panel-link:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
}

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-search-panel,
.spotlight-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.home-search-panel {
    margin: 28px 0 18px;
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff, #fff1f2);
    border: 1px solid #fee2e2;
}

.home-search-panel h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.home-search-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.wide-search,
.search-fields {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wide-search input,
.search-fields input,
.search-fields select,
.filter-item input,
.filter-item select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0 14px;
    outline: none;
}

.wide-search input {
    flex: 1;
}

.wide-search button,
.search-fields button {
    border-radius: 12px;
}

.category-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 6px;
    margin-bottom: 8px;
}

.category-strip a:hover {
    color: var(--red);
    border-color: #fecaca;
}

.content-section {
    margin-top: 44px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
}

.section-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more {
    min-height: auto;
    color: var(--red);
    background: #fff;
    border: 1px solid #fee2e2;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #374151);
}

.movie-card-large .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.rating-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
}

.rating-badge {
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, 0.92);
}

.play-chip {
    left: 10px;
    bottom: 10px;
    background: rgba(17, 24, 39, 0.82);
    backdrop-filter: blur(10px);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 850;
}

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

.movie-meta,
.movie-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.movie-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
    gap: 7px;
}

.tag-row span {
    font-size: 12px;
    padding: 4px 9px;
    background: #f9fafb;
}

.ranking-panel,
.side-card,
.search-console,
.filter-panel,
.ranking-table,
.category-card,
.top-rank-card {
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ranking-panel {
    position: sticky;
    top: 94px;
    padding: 22px;
}

.ranking-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

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

.rank-line {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: #f9fafb;
}

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

.rank-no,
.ranking-index {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--pink));
}

.rank-line strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-line em {
    color: var(--red);
    font-style: normal;
    font-weight: 900;
}

.panel-link {
    width: 100%;
    margin-top: 16px;
}

.page-hero {
    min-height: 300px;
    display: flex;
    align-items: end;
    margin-bottom: 30px;
    padding: clamp(28px, 5vw, 54px);
    color: #fff;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.page-hero-red {
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.28), transparent 30%),
        linear-gradient(135deg, var(--red), var(--pink));
}

.page-hero-dark {
    background:
        radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.35), transparent 28%),
        linear-gradient(135deg, #111827, #374151);
}

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

.category-list {
    display: grid;
    gap: 24px;
}

.category-card {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
    overflow: hidden;
}

.category-card-text span {
    color: var(--red);
    font-weight: 850;
}

.category-card-text h2 {
    margin: 10px 0;
    font-size: 30px;
}

.category-card-text p {
    color: var(--muted);
    line-height: 1.8;
}

.category-enter {
    margin-top: 12px;
}

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

.mini-poster {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    border-radius: 14px;
    background: #111827;
}

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

.mini-poster span {
    position: absolute;
    inset: auto 0 0;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 28px 10px 10px;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0));
}

.filter-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 20px;
    margin-bottom: 28px;
}

.filter-item {
    display: grid;
    gap: 8px;
}

.filter-item label {
    color: #374151;
    font-weight: 800;
}

.top-rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.top-rank-card {
    padding: 18px;
}

.top-rank-card a:first-child {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 10;
}

.top-rank-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-rank-card span {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    font-weight: 900;
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--red);
}

.top-rank-card h2 {
    margin: 14px 0 8px;
    font-size: 22px;
}

.top-rank-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.ranking-table {
    overflow: hidden;
}

.ranking-row {
    display: grid;
    grid-template-columns: 46px 70px minmax(160px, 1fr) minmax(220px, 1.2fr) 60px;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-row:hover {
    background: #fff1f2;
}

.ranking-row img {
    width: 70px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-row em {
    color: var(--muted);
    font-style: normal;
}

.ranking-row b {
    color: var(--red);
    font-size: 20px;
}

.search-console {
    padding: 24px;
}

.search-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px 120px;
    margin-bottom: 24px;
}

.search-results-empty {
    padding: 48px;
    text-align: center;
    color: var(--muted);
    border-radius: 18px;
    background: #f9fafb;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 2px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
}

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

.player-section {
    border-radius: 24px;
    overflow: hidden;
    background: #111827;
    box-shadow: var(--shadow);
}

.video-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.16));
}

.play-overlay.is-hidden {
    display: none;
}

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.32);
}

.detail-text,
.side-card {
    margin-top: 22px;
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.detail-text h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.18;
}

.detail-text h2 {
    margin: 28px 0 10px;
    font-size: 24px;
}

.detail-text p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.detail-meta span {
    border-radius: 999px;
    background: #f3f4f6;
    padding: 6px 12px;
}

.detail-tags {
    margin: 18px 0 0;
}

.detail-cover {
    width: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.side-card h2 {
    margin: 0 0 16px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

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

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

.side-card a {
    color: var(--red);
}

.related-section {
    margin-bottom: 20px;
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-inner h2 {
    color: #f87171;
}

.footer-inner p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: #9ca3af;
}

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

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

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

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

    .home-search-panel,
    .spotlight-layout,
    .detail-layout,
    .category-card {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 860px) {
    main,
    .header-inner,
    .mobile-panel,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

    .desktop-nav,
    .nav-search {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

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

    .hero-content {
        left: 22px;
        bottom: 62px;
        width: calc(100% - 44px);
    }

    .home-search-panel,
    .wide-search,
    .search-fields,
    .filter-panel,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .wide-search {
        display: grid;
    }

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

    .ranking-row {
        grid-template-columns: 38px 58px minmax(0, 1fr) 48px;
    }

    .ranking-row em {
        display: none;
    }

    .ranking-row img {
        width: 58px;
        height: 78px;
    }

    .detail-text,
    .side-card,
    .search-console,
    .home-search-panel {
        padding: 18px;
    }
}

@media (max-width: 520px) {
    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

    .hero-content h1,
    .page-hero h1 {
        font-size: 34px;
    }

    .hero-content p,
    .page-hero p {
        font-size: 15px;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

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