*,
*::before,
*::after {
    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: #fff7ed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #d97706, #f97316);
    box-shadow: 0 10px 30px rgba(154, 52, 18, 0.24);
}

.nav-row {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand,
.mobile-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand {
    color: #ffffff;
    font-size: 20px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #f97316;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55), 0 10px 24px rgba(0, 0, 0, 0.18);
    font-size: 13px;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fffbeb;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 16px;
    background: #ea580c;
}

.mobile-panel.open {
    display: block;
}

.mobile-logo {
    color: #ffffff;
    margin-bottom: 14px;
}

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

.mobile-link {
    color: #ffffff;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-link.active {
    background: rgba(255, 255, 255, 0.24);
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-slide .poster-fallback {
    display: none;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.46) 45%, rgba(0, 0, 0, 0.14));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 72px 0 76px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-content h1 {
    max-width: 800px;
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.06;
    font-weight: 900;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 28px;
    color: #f3f4f6;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.section-title-row,
.filter-row,
.info-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.button,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button {
    color: #ffffff;
    background: #d97706;
    box-shadow: 0 18px 35px rgba(217, 119, 6, 0.32);
}

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

.button:hover {
    background: #b45309;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
}

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

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

main {
    min-height: 60vh;
}

.section {
    padding: 56px 0;
}

.section-muted {
    background: #fffbeb;
}

.section-card {
    margin: 56px auto;
    padding: 34px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(146, 64, 14, 0.11);
}

.section-title-row {
    justify-content: space-between;
    margin-bottom: 26px;
}

.section-title-row h2,
.page-title,
.detail-title {
    margin: 0;
    color: #111827;
    font-weight: 900;
    line-height: 1.16;
}

.section-title-row h2 {
    font-size: clamp(26px, 3vw, 36px);
}

.section-title-row p,
.page-lead,
.detail-lead {
    color: #6b7280;
}

.view-more {
    color: #d97706;
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.11);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 45px rgba(146, 64, 14, 0.18);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #f59e0b, #ea580c 48%, #7c2d12);
}

.poster-frame img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.poster-frame.is-missing img,
.poster-frame img.is-hidden {
    display: none;
}

.poster-frame:hover img {
    transform: scale(1.08);
}

.poster-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 18px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.type-badge {
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    background: rgba(217, 119, 6, 0.94);
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.62);
    font-size: 14px;
}

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

.movie-title {
    display: block;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: #d97706;
}

.movie-desc {
    min-height: 44px;
    margin: 8px 0 12px;
    color: #6b7280;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 12px;
}

.meta-row span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff7ed;
}

.page-hero {
    padding: 54px 0 38px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.page-title {
    max-width: 900px;
    font-size: clamp(34px, 5vw, 54px);
}

.page-lead {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 18px;
}

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

.category-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    position: relative;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c 48%, #7c2d12);
    box-shadow: 0 18px 38px rgba(146, 64, 14, 0.16);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 36%);
}

.category-card h2,
.category-card p,
.category-card span {
    position: relative;
    z-index: 1;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
}

.category-card span {
    font-weight: 900;
}

.filter-panel {
    margin: 0 0 28px;
    padding: 20px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(146, 64, 14, 0.10);
}

.filter-row input,
.filter-row select {
    min-height: 44px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fffaf0;
    color: #111827;
    padding: 0 14px;
    outline: none;
}

.filter-row input {
    flex: 1 1 260px;
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 20px;
    color: #92400e;
    background: #ffedd5;
    text-align: center;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #92400e;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

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

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

.detail-card,
.side-card {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(146, 64, 14, 0.11);
}

.detail-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #111827;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.34), rgba(0, 0, 0, 0.74));
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #d97706;
    box-shadow: 0 20px 46px rgba(217, 119, 6, 0.34);
    font-size: 34px;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 6;
    color: #ffffff;
    font-size: 13px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.detail-body {
    padding: 28px;
}

.detail-title {
    font-size: clamp(30px, 4vw, 44px);
}

.detail-lead {
    margin: 12px 0 20px;
    font-size: 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 800;
}

.text-block {
    margin-top: 26px;
}

.text-block h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 24px;
}

.text-block p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 20px;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #ffedd5;
}

.info-list span:first-child {
    color: #6b7280;
}

.info-list span:last-child {
    color: #111827;
    font-weight: 800;
    text-align: right;
}

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

.related-item {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item .poster-frame {
    border-radius: 14px;
}

.related-item h3 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 15px;
}

.related-item p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.search-shell {
    max-width: 900px;
    margin: 0 auto;
}

.search-box-large {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(146, 64, 14, 0.12);
}

.search-box-large input {
    flex: 1;
    min-height: 48px;
    border: 0;
    outline: none;
    padding: 0 12px;
    font-size: 18px;
}

.search-box-large button {
    border: 0;
}

.site-footer {
    margin-top: 64px;
    padding: 44px 0 0;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    font-size: 19px;
}

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

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 17px;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

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

@media (max-width: 980px) {
    .movie-grid,
    .movie-grid.three,
    .category-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .side-card {
        order: 2;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .brand-text {
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

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

    .hero-content {
        padding: 50px 0 68px;
    }

    .hero-control {
        display: none;
    }

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

    .section-card {
        padding: 22px;
    }

    .movie-grid,
    .movie-grid.two,
    .movie-grid.three,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box-large {
        flex-direction: column;
    }

    .detail-body {
        padding: 22px;
    }
}
