* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f9fafb;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0, #f9fafb 22rem, #f9fafb 100%);
    color: #111827;
}

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;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ea580c);
    box-shadow: 0 18px 42px rgba(234, 88, 12, 0.22);
}

.header-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo {
    flex: 0 0 auto;
    font-size: 1.28rem;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    color: #ea580c;
    background: #ffffff;
    border-radius: 0.9rem;
    box-shadow: 0 12px 24px rgba(154, 52, 18, 0.2);
}

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

.main-nav a,
.sub-nav a,
.header-search button {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.main-nav a {
    padding: 0.4rem 0;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 650;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffedd5;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.header-search input {
    width: 15.5rem;
    height: 2.45rem;
    border: 0;
    outline: none;
    border-radius: 999px;
    padding: 0 1rem;
    color: #1f2937;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 237, 213, 0.7);
}

.header-search button,
.primary-button,
.secondary-button,
.filter-button,
.search-panel button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 700;
}

.header-search button {
    height: 2.45rem;
    padding: 0 1rem;
    color: #ea580c;
    background: #ffedd5;
}

.header-search button:hover,
.primary-button:hover,
.filter-button:hover,
.search-panel button:hover {
    transform: translateY(-1px);
    background: #fed7aa;
}

.menu-button {
    display: none;
    border: 0;
    border-radius: 0.8rem;
    padding: 0.48rem 0.7rem;
    color: #ea580c;
    background: #ffffff;
}

.sub-nav {
    display: flex;
    gap: 1.15rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
}

.sub-nav a:hover {
    color: #ffedd5;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.active .hero-backdrop {
    transform: scale(1.12);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0, rgba(0, 0, 0, 0.56) 45%, rgba(0, 0, 0, 0.24) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.36) 0, rgba(0, 0, 0, 0.84) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 5rem 1.25rem 7rem;
}

.hero-copy {
    width: min(720px, 100%);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.4rem 0.78rem;
    color: #ffedd5;
    background: rgba(249, 115, 22, 0.22);
    font-size: 0.9rem;
    font-weight: 750;
    backdrop-filter: blur(14px);
}

.hero h1 {
    margin: 1.1rem 0 1rem;
    font-size: clamp(2.3rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    max-width: 54rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.25rem 0 1.7rem;
}

.hero-meta span {
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0 1.25rem;
}

.primary-button {
    color: #ffffff;
    background: #f97316;
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.28);
}

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

.secondary-button.dark {
    color: #ea580c;
    border-color: rgba(249, 115, 22, 0.22);
    background: #fff7ed;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transform: translateY(-50%);
}

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

.hero-control.prev {
    left: 1.25rem;
}

.hero-control.next {
    right: 1.25rem;
}

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

.hero-dots button {
    width: 0.72rem;
    height: 0.72rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dots button.active {
    width: 2.1rem;
    background: #f97316;
}

.page-main,
.page-section {
    width: min(1280px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.page-main {
    padding: 2.2rem 0 4rem;
}

.page-section {
    padding: 3.3rem 0 0;
}

.section-header,
.list-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.35rem;
}

.section-title {
    margin: 0.55rem 0 0;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
    margin: 0.65rem 0 0;
    max-width: 56rem;
    color: #6b7280;
    line-height: 1.8;
}

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

.movie-card,
.category-card,
.info-card,
.detail-panel,
.search-panel,
.filter-panel,
.player-shell {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.15);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-play {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    left: 0.7rem;
    top: 0.7rem;
    display: grid;
    place-items: center;
    min-width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.8rem;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0.9rem;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    color: #f97316;
    font-size: 0.82rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0.45rem 0 0.35rem;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.compact-link:hover .compact-title {
    color: #ea580c;
}

.movie-card p {
    flex: 1;
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.62;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-top: 0.75rem;
}

.tag-row span,
.breadcrumb a,
.breadcrumb span,
.detail-tags span,
.category-count {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.26rem 0.58rem;
    color: #ea580c;
    background: #fff7ed;
    font-size: 0.78rem;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 14rem;
    padding: 1.15rem;
    color: #ffffff;
    background: #111827;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(17, 24, 39, 0.18);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(17, 24, 39, 0.86));
}

.category-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 12rem;
    flex-direction: column;
    justify-content: flex-end;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0 0 0.8rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

.category-count {
    align-self: flex-start;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.compact-list {
    display: grid;
    gap: 0.7rem;
}

.compact-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.35rem 0.7rem;
    align-items: center;
    border-radius: 0.9rem;
    padding: 0.75rem;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.7rem;
    color: #ffffff;
    background: #f97316;
    font-weight: 800;
}

.compact-title {
    overflow: hidden;
    min-width: 0;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-meta {
    overflow: hidden;
    min-width: 0;
    color: #6b7280;
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-panel,
.search-panel {
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.filter-form,
.search-form {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) 12rem 10rem auto;
    gap: 0.75rem;
}

.filter-form input,
.filter-form select,
.search-form input,
.search-panel input {
    min-height: 2.7rem;
    border: 1px solid #fed7aa;
    border-radius: 0.85rem;
    outline: none;
    padding: 0 0.9rem;
    color: #1f2937;
    background: #ffffff;
}

.filter-form input:focus,
.filter-form select:focus,
.search-form input:focus,
.search-panel input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.filter-button,
.search-panel button {
    min-height: 2.7rem;
    padding: 0 1rem;
    color: #ffffff;
    background: #f97316;
}

.empty-state {
    display: none;
    border-radius: 1rem;
    padding: 2rem;
    color: #6b7280;
    background: #ffffff;
    text-align: center;
}

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

.page-hero {
    color: #ffffff;
    background:
        linear-gradient(120deg, rgba(17, 24, 39, 0.95), rgba(249, 115, 22, 0.75)),
        radial-gradient(circle at top right, rgba(255, 237, 213, 0.24), transparent 28rem);
}

.page-hero .page-main {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.page-hero h1 {
    margin: 0;
    max-width: 60rem;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    margin: 1rem 0 0;
    max-width: 58rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(19rem, 0.88fr);
    gap: 1.25rem;
    align-items: start;
}

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

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.66));
    cursor: pointer;
}

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

.play-overlay span {
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.96);
    box-shadow: 0 24px 52px rgba(249, 115, 22, 0.36);
    font-size: 2rem;
}

.detail-panel {
    padding: 1.2rem;
}

.detail-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.detail-lead {
    margin: 0 0 1rem;
    color: #4b5563;
    font-size: 1.08rem;
    line-height: 1.85;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.info-card {
    padding: 0.9rem;
}

.info-card b {
    display: block;
    color: #6b7280;
    font-size: 0.78rem;
}

.info-card span {
    display: block;
    margin-top: 0.25rem;
    font-weight: 750;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.text-block {
    margin-top: 1.2rem;
}

.text-block h2 {
    margin: 0 0 0.6rem;
    font-size: 1.35rem;
}

.text-block p {
    margin: 0;
    color: #4b5563;
    line-height: 1.9;
}

.side-card {
    padding: 1rem;
    border-radius: 1.1rem;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.side-card h2,
.side-card h3 {
    margin: 0 0 0.8rem;
    font-size: 1.2rem;
}

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

.search-results {
    display: grid;
    gap: 1rem;
}

.search-result-card {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 1rem;
    border-radius: 1rem;
    padding: 0.85rem;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.search-result-card img {
    width: 8rem;
    aspect-ratio: 2 / 3;
    border-radius: 0.8rem;
    object-fit: cover;
}

.search-result-card h2 {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.25rem;
}

.search-result-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.72;
}

.site-footer {
    margin-top: 2rem;
    color: #f9fafb;
    background: #111827;
}

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

.footer-logo {
    font-size: 1.25rem;
}

.site-footer p {
    color: #d1d5db;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.footer-links a {
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    color: #ffedd5;
    background: rgba(249, 115, 22, 0.12);
}

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

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

@media (max-width: 980px) {
    .header-main {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .header-search {
        margin-left: auto;
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }

    .filter-form,
    .search-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .header-main {
        gap: 0.8rem;
    }

    .logo {
        font-size: 1.05rem;
    }

    .header-search {
        display: none;
    }

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .sub-nav {
        display: none;
        flex-direction: column;
        padding-top: 0.5rem;
    }

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

    .hero {
        min-height: 540px;
    }

    .hero-content {
        padding: 4rem 1.25rem 6rem;
    }

    .hero-control {
        display: none;
    }

    .page-main,
    .page-section {
        width: min(100% - 1.4rem, 1280px);
    }

    .section-header,
    .list-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .filter-form,
    .search-form {
        grid-template-columns: 1fr;
    }

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

    .search-result-card {
        grid-template-columns: 5.5rem minmax(0, 1fr);
    }

    .search-result-card img {
        width: 5.5rem;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
