* {
    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: #1f2937;
    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);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

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

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

.site-logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.35);
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ea580c;
    background: #fff7ed;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.nav-search input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

.nav-search button,
.primary-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(239, 68, 68, 0.32);
}

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

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

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000000;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.24), transparent 28%),
        linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 74px;
    transform: translateX(-50%);
    width: min(1200px, calc(100% - 40px));
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    border-radius: 999px;
    background: #f97316;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.32);
}

.hero-content h1,
.hero-content h2 {
    max-width: 820px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 18px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags,
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #ea580c;
    background: #ffedd5;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

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

.ghost-button:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.52);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.78);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.active {
    width: 28px;
    border-radius: 999px;
    background: #f97316;
}

.page-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    color: #1f2937;
}

.section-head p {
    margin: 6px 0 0;
    color: #6b7280;
}

.section-more {
    color: #ea580c;
    font-weight: 800;
}

.featured-grid,
.movie-grid,
.category-card-grid,
.ranking-podium {
    display: grid;
    gap: 20px;
}

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

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

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

.movie-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.14);
}

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

.poster-wrap {
    position: relative;
    height: 260px;
    margin: 0;
    overflow: hidden;
    background: #111827;
}

.movie-card-small .poster-wrap {
    height: 190px;
}

.movie-card-large .poster-wrap {
    height: 340px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 56%);
    opacity: 0.9;
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    border-radius: 50%;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 9px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    border-radius: 999px;
    font-size: 12px;
}

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

.movie-card-body h2 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-small .movie-card-body h2 {
    font-size: 15px;
}

.movie-card-body p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: #9ca3af;
    font-size: 12px;
}

.category-panel {
    width: min(1220px, calc(100% - 32px));
    margin-top: 56px;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.category-strip {
    margin-top: 28px;
}

.category-strip-title {
    display: inline-flex;
    margin-bottom: 14px;
    color: #374151;
    font-size: 20px;
    font-weight: 800;
    transition: color 0.2s ease;
}

.category-strip-title:hover {
    color: #ea580c;
}

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

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

.compact-card {
    position: relative;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.compact-card img {
    width: 160px;
    height: 92px;
    border-radius: 10px;
    object-fit: cover;
    background: #111827;
}

.compact-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #111827;
}

.compact-card p {
    margin: 0 0 6px;
    color: #6b7280;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card span {
    color: #9ca3af;
    font-size: 12px;
}

.mini-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    background: #f97316;
    border-radius: 50%;
    font-weight: 800;
}

.inner-hero {
    position: relative;
    overflow: hidden;
    padding: 72px max(24px, calc((100% - 1200px) / 2)) 70px;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 20%, rgba(251, 146, 60, 0.45), transparent 30%),
        linear-gradient(135deg, #111827, #7c2d12 55%, #111827);
}

.inner-hero span {
    display: inline-flex;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fed7aa;
    font-weight: 800;
}

.inner-hero h1 {
    max-width: 820px;
    margin: 18px 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
}

.inner-hero p {
    max-width: 720px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
}

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

.category-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.14);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: 180px;
    background: #111827;
}

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

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

.category-card-body h2 {
    margin: 0 0 8px;
    color: #111827;
}

.category-card-body p {
    margin: 0 0 14px;
    color: #6b7280;
}

.category-card-body span {
    color: #ea580c;
    font-weight: 800;
}

.filter-panel {
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.filter-panel input {
    width: 100%;
    margin-bottom: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 13px 16px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #4b5563;
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
    color: #ffffff;
    background: #f97316;
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 18px;
    background: #ffffff;
    color: #6b7280;
    text-align: center;
    font-weight: 700;
}

.empty-state.visible {
    display: block;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding: 96px max(24px, calc((100% - 1200px) / 2)) 54px;
    color: #ffffff;
    background: #000000;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: blur(2px);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 30%, rgba(249, 115, 22, 0.28), transparent 26%),
        linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
}

.detail-cover,
.detail-info {
    position: relative;
    z-index: 1;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 28px 55px rgba(0, 0, 0, 0.45);
}

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

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-info p {
    max-width: 760px;
    margin: 0 0 18px;
    color: #e5e7eb;
    font-size: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-card,
.content-card,
.side-panel,
.detail-meta-list {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.player-card {
    padding: 16px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000000;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.content-card,
.side-panel {
    padding: 24px;
}

.content-card h2,
.side-panel h2 {
    margin: 0 0 14px;
    color: #111827;
}

.content-card p {
    margin: 0;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.9;
}

.detail-meta-list {
    list-style: none;
    margin: 0;
    padding: 20px;
    display: grid;
    gap: 14px;
}

.detail-meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 12px;
}

.detail-meta-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-meta-list b {
    color: #111827;
}

.detail-meta-list span {
    color: #6b7280;
    text-align: right;
}

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

.prose-card {
    max-width: 860px;
    margin: 0 auto;
}

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

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 28px;
}

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

.footer-grid p {
    margin: 0 0 10px;
    color: #9ca3af;
}

.footer-grid a {
    display: block;
    margin-bottom: 9px;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.footer-grid a:hover {
    color: #fb923c;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .site-nav {
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .nav-search {
        order: 3;
        width: 100%;
        min-width: 0;
    }

    .featured-grid,
    .movie-grid,
    .dense-grid,
    .category-card-grid,
    .ranking-podium,
    .category-strip-grid,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 768px) {
    .site-nav {
        min-height: 64px;
        gap: 12px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        order: 2;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        background: #ffffff;
        border-radius: 16px;
        padding: 10px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        padding: 11px 14px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        bottom: 70px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-control {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .page-section,
    .category-panel {
        width: min(100% - 24px, 1200px);
        padding-top: 42px;
    }

    .category-panel {
        padding: 24px;
    }

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

    .featured-grid,
    .movie-grid,
    .dense-grid,
    .category-card-grid,
    .ranking-podium,
    .category-strip-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .poster-wrap,
    .movie-card-small .poster-wrap,
    .movie-card-large .poster-wrap {
        height: 220px;
    }

    .compact-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .compact-card img {
        width: 112px;
        height: 78px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding-top: 58px;
    }

    .detail-cover {
        max-width: 240px;
    }

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

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

    .nav-search {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        bottom: 62px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .featured-grid,
    .movie-grid,
    .dense-grid,
    .category-card-grid,
    .ranking-podium,
    .category-strip-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .movie-card-small .poster-wrap,
    .movie-card-large .poster-wrap {
        height: 280px;
    }

    .inner-hero {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .filter-panel {
        padding: 14px;
    }

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