* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    color: #292524;
    background: #fafaf9;
    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: linear-gradient(90deg, #292524, #78350f, #292524);
    border-bottom: 2px solid #d97706;
    box-shadow: 0 12px 35px rgba(41, 37, 36, 0.25);
}

.header-inner {
    max-width: 1180px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff7ed;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.28);
    font-size: 18px;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 22px;
    line-height: 1.1;
    color: #fde68a;
    letter-spacing: 1px;
}

.brand-text em {
    color: #fcd34d;
    font-size: 12px;
    font-style: normal;
}

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

.nav-link {
    color: #ffedd5;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 15px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: #d97706;
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.16);
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    margin: 4px auto;
    display: block;
    background: #ffedd5;
    border-radius: 99px;
}

.hero-carousel {
    position: relative;
    min-height: 610px;
    background: linear-gradient(135deg, #1c1917, #78350f 55%, #292524);
    overflow: hidden;
}

.hero-track {
    position: relative;
    min-height: 610px;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 610px;
    object-fit: cover;
    opacity: 0.28;
    transform: scale(1.02);
}

.hero-image.is-missing {
    opacity: 0;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 25%, rgba(251, 191, 36, 0.22), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(1180px, calc(100% - 40px));
    transform: translate(-50%, -50%);
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -1px;
}

.hero-content h3 {
    max-width: 720px;
    margin: 0 0 14px;
    color: #fde68a;
    font-size: clamp(22px, 3vw, 34px);
}

.hero-content p {
    max-width: 650px;
    margin: 0 0 22px;
    color: #f5f5f4;
    font-size: 18px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.btn-full {
    width: 100%;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 36px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
    background: #fbbf24;
}

.hero-thumbs {
    position: absolute;
    right: max(20px, calc((100% - 1180px) / 2));
    bottom: 104px;
    z-index: 4;
    display: grid;
    gap: 10px;
    width: 245px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px;
    color: #fff7ed;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

.hero-thumb img {
    width: 58px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #292524, #92400e);
}

.hero-thumb img.is-missing {
    opacity: 0;
}

.hero-thumb span {
    font-size: 14px;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-hero-block,
.content-section,
.detail-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 20px;
}

.search-hero-inner {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 440px);
    align-items: center;
    gap: 24px;
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    box-shadow: 0 18px 45px rgba(120, 53, 15, 0.12);
    border: 1px solid #fed7aa;
}

.search-hero-inner h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 42px);
}

.search-hero-inner p {
    margin: 0;
    color: #57534e;
}

.hero-search-form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #fed7aa;
}

.hero-search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 12px;
    color: #292524;
}

.hero-search-form button {
    border: 0;
    padding: 0 18px;
    border-radius: 14px;
    color: #ffffff;
    background: #d97706;
    cursor: pointer;
    font-weight: 700;
}

.section-header,
.category-overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-header h2,
.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.15;
}

.section-header p,
.category-overview-head p {
    max-width: 720px;
    margin: 0;
    color: #57534e;
}

.section-more {
    flex: none;
    color: #b45309;
    font-weight: 700;
}

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

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

.rank-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.rank-list-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(41, 37, 36, 0.1);
    border: 1px solid #f5f5f4;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 55px rgba(120, 53, 15, 0.18);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 70% 20%, rgba(251, 191, 36, 0.32), transparent 30%),
        linear-gradient(135deg, #292524, #92400e);
}

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

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

.poster-frame img.is-missing {
    opacity: 0;
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
    opacity: 0.88;
}

.poster-year,
.rank-number,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-year {
    left: 12px;
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.9);
    font-size: 12px;
    font-weight: 700;
}

.rank-number {
    right: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
    font-weight: 900;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.92);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: #a16207;
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card h3 a:hover {
    color: #b45309;
}

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

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags a,
.movie-tags span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fffbeb;
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(41, 37, 36, 0.08);
    border: 1px solid #fed7aa;
}

.category-card-main {
    position: relative;
    min-height: 170px;
    display: grid;
    align-content: end;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #292524, #78350f);
    overflow: hidden;
}

.category-glow {
    position: absolute;
    right: -50px;
    top: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.22);
}

.category-card-main strong {
    position: relative;
    font-size: 28px;
    margin-bottom: 8px;
}

.category-card-main em {
    position: relative;
    color: #ffedd5;
    font-style: normal;
}

.category-mini-links {
    display: grid;
    gap: 8px;
    padding: 16px 20px 20px;
}

.category-mini-links a {
    color: #57534e;
    font-weight: 700;
}

.category-mini-links a:hover {
    color: #b45309;
}

.page-hero {
    min-height: 310px;
    display: grid;
    align-content: center;
    padding: 74px 20px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.22), transparent 28%),
        linear-gradient(135deg, #1c1917, #78350f 60%, #292524);
}

.page-hero > * {
    width: min(1180px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.page-hero h1 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin-top: 0;
    color: #ffedd5;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 170px 170px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(41, 37, 36, 0.08);
    border: 1px solid #fed7aa;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 0 12px;
    outline: 0;
    background: #fffbeb;
    color: #292524;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

.empty-state {
    padding: 50px 20px;
    text-align: center;
    color: #78716c;
    font-size: 18px;
}

.category-overview-block {
    margin-bottom: 52px;
}

.detail-wrap {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: #78716c;
    font-weight: 700;
}

.breadcrumb a {
    color: #b45309;
}

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

.detail-main,
.detail-side > div,
.detail-content-card {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(41, 37, 36, 0.09);
    border: 1px solid #f5f5f4;
}

.detail-main {
    overflow: hidden;
}

.player-panel {
    position: relative;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 30%),
        #000000;
    overflow: hidden;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 12px;
    padding: 24px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.75));
    cursor: pointer;
    text-align: center;
}

.player-cover.is-hidden {
    display: none;
}

.play-circle {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
    font-size: 30px;
}

.player-cover strong {
    font-size: clamp(22px, 4vw, 40px);
    line-height: 1.2;
}

.player-cover em {
    max-width: 720px;
    color: #ffedd5;
    font-style: normal;
}

.player-message {
    position: absolute;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    font-size: 14px;
}

.detail-title-block {
    padding: 28px 28px 20px;
}

.detail-title-block h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

.detail-title-block p {
    margin: 0 0 18px;
    color: #57534e;
    font-size: 17px;
}

.detail-title-block .detail-meta span {
    color: #92400e;
    background: #fffbeb;
    border-color: #fed7aa;
}

.detail-content-card {
    margin: 0 28px 28px;
    padding: 24px;
}

.detail-content-card h2,
.side-rank-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-content-card p {
    margin: 0;
    color: #44403c;
    font-size: 16px;
}

.detail-side {
    display: grid;
    gap: 22px;
    position: sticky;
    top: 92px;
}

.side-cover-card {
    padding: 18px;
}

.detail-poster {
    border-radius: 20px;
    margin-bottom: 16px;
}

.side-rank-card {
    padding: 20px;
}

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

.side-rank-links a {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: #fffbeb;
    color: #44403c;
}

.side-rank-links a:hover {
    color: #b45309;
    background: #fef3c7;
}

.side-rank-links span {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #d97706;
    font-weight: 900;
}

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

.related-section {
    padding-top: 10px;
}

.site-footer {
    color: #ffedd5;
    background: linear-gradient(90deg, #1c1917, #451a03, #1c1917);
    border-top: 2px solid #92400e;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #fde68a;
    font-size: 22px;
}

.footer-inner p {
    max-width: 760px;
    color: #d6d3d1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 20px 0;
}

.footer-links a {
    color: #fde68a;
    font-weight: 700;
}

.copyright {
    margin-bottom: 0;
    color: #a8a29e;
    font-size: 14px;
}

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

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

    .hero-thumbs {
        display: none;
    }

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

    .detail-side {
        position: static;
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        padding: 12px;
        border-radius: 20px;
        background: #292524;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    }

    .nav-links.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-hero-inner {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 640px) {
    .header-inner {
        min-height: 64px;
        padding: 0 14px;
    }

    .brand-text em {
        display: none;
    }

    .hero-carousel,
    .hero-track,
    .hero-image {
        min-height: 560px;
    }

    .hero-content {
        width: calc(100% - 32px);
    }

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

    .hero-controls {
        bottom: 22px;
    }

    .content-section,
    .search-hero-block,
    .detail-wrap {
        padding: 36px 14px;
    }

    .section-header,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .hero-search-form {
        display: grid;
    }

    .hero-search-form button {
        min-height: 42px;
    }

    .detail-title-block,
    .detail-content-card {
        margin-left: 14px;
        margin-right: 14px;
        padding: 18px;
    }

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