* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #111827;
    background: #f9fafb;
    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 1px 8px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.nav-shell {
    max-width: 80rem;
    height: 4rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.9rem;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.brand-name {
    color: #111827;
    font-size: 1.25rem;
    font-weight: 800;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin-left: auto;
}

.nav-link {
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link.active {
    color: #0891b2;
}

.header-search {
    width: 16rem;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    outline: none;
    background: #ffffff;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
    height: 2.5rem;
    padding: 0 1rem;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 0.6rem;
    background: #f3f4f6;
    color: #374151;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
}

.mobile-menu {
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    background: #ffffff;
}

.mobile-search {
    margin-bottom: 0.75rem;
}

.mobile-link {
    display: block;
    padding: 0.75rem 0.5rem;
    border-radius: 0.6rem;
    color: #374151;
    font-weight: 600;
}

.mobile-link:hover {
    background: #f9fafb;
    color: #0891b2;
}

.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.56) 45%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: max(1rem, calc((100% - 80rem) / 2 + 1rem));
    width: min(42rem, calc(100% - 2rem));
    transform: translateY(-50%);
    color: #ffffff;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    margin: 0 0 1.5rem;
    color: #e5e7eb;
    font-size: 1.08rem;
    max-width: 40rem;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.8rem;
    color: #d1d5db;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0 1.35rem;
    border-radius: 0.7rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    background: #2563eb;
    color: #ffffff;
}

.primary-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

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

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

.ghost-button.dark {
    border-color: rgba(17, 24, 39, 0.16);
    background: rgba(255, 255, 255, 0.12);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

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

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 2rem;
    display: flex;
    gap: 0.5rem;
    transform: translateX(-50%);
}

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

.hero-dot.active {
    width: 2rem;
    background: #ffffff;
}

.content-section {
    padding: 3rem 0;
    background: #ffffff;
}

.soft-section {
    background: #f9fafb;
}

.section-shell,
.footer-shell,
.detail-shell {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.narrow-shell {
    max-width: 64rem;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.2;
}

.section-heading p {
    margin: 0.25rem 0 0;
    color: #6b7280;
}

.section-more {
    flex-shrink: 0;
    color: #2563eb;
    font-weight: 800;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.movie-card {
    overflow: hidden;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-cover {
    position: relative;
    height: 13rem;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.cover-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    padding: 0.18rem 0.5rem;
    border-radius: 0.35rem;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
}

.play-orb {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #2563eb;
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-orb {
    opacity: 1;
    transform: scale(1);
}

.movie-card-body {
    padding: 1rem;
}

.movie-card-body h3 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: #2563eb;
}

.movie-card-body p {
    min-height: 2.75rem;
    margin: 0.55rem 0 0;
    color: #6b7280;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.8rem;
    color: #6b7280;
    font-size: 0.76rem;
}

.movie-card-meta span:first-child {
    color: #374151;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scroll-wrap {
    position: relative;
}

.movie-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 1rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.movie-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-item {
    flex: 0 0 18rem;
}

.scroll-item .movie-cover {
    height: 20rem;
}

.scroll-button {
    position: absolute;
    z-index: 2;
    top: 42%;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 1.5rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.scroll-button.left {
    left: -0.6rem;
}

.scroll-button.right {
    right: -0.6rem;
}

.category-grid,
.category-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.category-tile {
    display: block;
    min-height: 8rem;
    padding: 1.1rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
    border: 1px solid #dbeafe;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.13);
}

.category-tile strong,
.category-tile span {
    display: block;
}

.category-tile strong {
    color: #111827;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.category-tile span {
    color: #6b7280;
    font-size: 0.9rem;
}

.category-card {
    position: relative;
    display: block;
    height: 14rem;
    min-height: 14rem;
    overflow: hidden;
    border-radius: 1rem;
    background: #111827;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

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

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

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1));
}

.category-card-text {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    color: #ffffff;
}

.category-card-text strong,
.category-card-text small {
    display: block;
}

.category-card-text strong {
    font-size: 1.2rem;
}

.category-card-text small {
    margin-top: 0.4rem;
    color: #d1d5db;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.7fr);
    gap: 2rem;
}

.rank-list,
.list-stack {
    display: grid;
    gap: 0.85rem;
}

.rank-row {
    display: grid;
    grid-template-columns: 2.5rem 4.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem;
    border-radius: 0.85rem;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.rank-number {
    color: #2563eb;
    font-size: 1.3rem;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 4.4rem;
    height: 5.2rem;
    border-radius: 0.55rem;
    object-fit: cover;
    overflow: hidden;
    transition: transform 0.45s ease;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info small {
    display: block;
}

.rank-info strong {
    overflow: hidden;
    color: #111827;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info small {
    margin-top: 0.2rem;
    color: #6b7280;
}

.rank-score {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
}

.movie-card-horizontal .movie-card-link {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
}

.movie-card-horizontal .movie-cover {
    height: 100%;
    min-height: 9rem;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.38), transparent 32%), linear-gradient(135deg, #111827, #0f172a 72%);
    color: #ffffff;
}

.compact-hero {
    padding: 5.5rem 0 4.5rem;
}

.page-hero-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.page-hero p {
    max-width: 46rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12rem;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.filter-panel label span {
    display: block;
    margin-bottom: 0.35rem;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    height: 2.8rem;
    padding: 0 1rem;
    border-radius: 0.7rem;
}

.empty-state {
    padding: 1rem;
    border-radius: 0.85rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.detail-hero {
    padding: 2rem 0 4rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    color: #d1d5db;
    font-size: 0.9rem;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

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

.detail-info .detail-one-line {
    color: #e5e7eb;
}

.detail-meta span {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #dbeafe;
    font-size: 0.86rem;
    font-weight: 700;
}

.player-section {
    padding: 3rem 0;
    background: #0f172a;
    color: #ffffff;
}

.player-section h2 {
    margin: 0 0 1rem;
    font-size: 1.6rem;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #000000;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.36);
    color: #ffffff;
    cursor: pointer;
}

.play-overlay span {
    width: 5rem;
    height: 5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover span {
    background: #1d4ed8;
    transform: scale(1.06);
}

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

.detail-content-section {
    background: #ffffff;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2rem;
}

.detail-article,
.detail-side,
.prose-shell {
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.detail-article,
.detail-side {
    padding: 1.5rem;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 1rem;
    color: #111827;
}

.detail-article p,
.prose-shell p {
    margin: 0 0 1rem;
    color: #374151;
    font-size: 1rem;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.8rem 1rem;
    margin: 0;
}

.detail-side dt {
    color: #6b7280;
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: #111827;
}

.prose-shell {
    padding: 2rem;
}

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

.footer-shell {
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo .brand-name {
    color: #ffffff;
}

.footer-brand p {
    max-width: 34rem;
    color: #d1d5db;
}

.footer-column h2 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 0.95rem;
}

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

.footer-column li + li {
    margin-top: 0.7rem;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
}

.footer-bottom p {
    margin: 0;
}

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

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

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

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-content {
        top: auto;
        bottom: 4.5rem;
        transform: none;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .detail-poster {
        max-width: 18rem;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .nav-shell {
        gap: 0.75rem;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .hero-slider {
        height: 620px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2rem;
    }

    .hero-content p,
    .page-hero p,
    .detail-one-line {
        font-size: 1rem;
    }

    .movie-grid,
    .category-grid,
    .category-card-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .movie-cover {
        height: 15rem;
    }

    .scroll-item {
        flex-basis: 16rem;
    }

    .scroll-item .movie-cover {
        height: 18rem;
    }

    .movie-card-horizontal .movie-card-link {
        grid-template-columns: 7.5rem minmax(0, 1fr);
    }

    .rank-row {
        grid-template-columns: 2rem 3.8rem minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

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

    .footer-main,
    .footer-bottom {
        grid-template-columns: 1fr;
        display: grid;
    }
}
