* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #243042;
    background: #fff7ed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    color: #ffffff;
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 48%, #d97706 100%);
    box-shadow: 0 16px 40px rgba(146, 64, 14, 0.24);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.site-logo {
    font-size: 24px;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.22);
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.nav-link,
.mobile-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #78350f;
    background: rgba(255, 255, 255, 0.82);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    color: #ffffff;
    background: radial-gradient(circle at 18% 16%, rgba(251, 191, 36, 0.42), transparent 34%), linear-gradient(135deg, #0f172a 0%, #1f2937 44%, #92400e 100%);
}

.hero-track {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 48px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.18;
    filter: blur(10px) saturate(1.25);
    transform: scale(1.08);
}

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

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.86));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-row,
.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags,
.detail-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 800;
}

.hero-actions,
.detail-actions,
.center-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.34);
}

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

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.ghost-btn.light {
    color: #78350f;
    background: #ffffff;
}

.hero-poster {
    justify-self: end;
    width: min(380px, 100%);
    padding: 14px;
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    border-radius: 24px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 40px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.hero-controls button,
.hero-dots button {
    border: 0;
    cursor: pointer;
}

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.active {
    width: 30px;
    background: #fbbf24;
}

.content-section,
.search-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.search-section {
    padding-bottom: 18px;
}

.section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.12;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: #64748b;
}

.compact-heading {
    margin-bottom: 18px;
}

.search-panel {
    padding: 20px;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 48px rgba(146, 64, 14, 0.12);
    backdrop-filter: blur(12px);
}

.search-panel input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 1px solid #fde68a;
    border-radius: 18px;
    outline: none;
    color: #111827;
    background: #ffffff;
}

.search-panel input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.filter-row {
    margin-top: 14px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    cursor: pointer;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    color: #111827;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(120, 53, 15, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(120, 53, 15, 0.18);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fef3c7);
}

.poster-frame img {
    width: 100%;
    aspect-ratio: 3 / 4.12;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #d97706;
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 8px 0 8px;
    min-height: 48px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 0;
    min-height: 70px;
    color: #64748b;
    font-size: 14px;
}

.tag-row {
    margin-top: 14px;
    gap: 6px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: #b45309;
    background: #fff7ed;
}

.alt-section {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(180deg, rgba(255, 251, 235, 0), #ffffff 42%, rgba(255, 237, 213, 0.72));
}

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

.category-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    padding: 18px;
    border-radius: 26px;
    color: #111827;
    background: #ffffff;
    box-shadow: 0 16px 44px rgba(120, 53, 15, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(120, 53, 15, 0.16);
}

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

.category-previews img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
    background: #fed7aa;
}

.category-card h3 {
    margin: 8px 0 8px;
    color: #111827;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #64748b;
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 58px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    color: #111827;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(120, 53, 15, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 52px rgba(120, 53, 15, 0.16);
}

.rank-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    background: #fed7aa;
}

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

.rank-info strong,
.rank-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info strong {
    color: #111827;
    font-size: 16px;
}

.rank-info small {
    margin-top: 4px;
    color: #64748b;
}

.center-actions {
    justify-content: center;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 54px;
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.22), transparent 32%), linear-gradient(135deg, #111827, #92400e 72%, #f97316);
    box-shadow: 0 24px 70px rgba(120, 53, 15, 0.24);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.category-hero,
.ranking-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.narrow-search {
    padding-top: 28px;
}

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

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: #92400e;
    font-weight: 800;
}

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

.detail-top {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 38px;
    align-items: center;
    padding: 34px;
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.28), transparent 34%), linear-gradient(135deg, #111827, #1f2937 46%, #92400e);
    box-shadow: 0 24px 70px rgba(120, 53, 15, 0.24);
}

.detail-poster {
    padding: 12px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.14;
    object-fit: cover;
    border-radius: 20px;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.lead-text {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
}

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

.player-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

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

.play-symbol {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 18px 46px rgba(249, 115, 22, 0.42);
    font-size: 32px;
}

.detail-content {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.story-card {
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(120, 53, 15, 0.1);
}

.story-card h2 {
    margin: 0 0 14px;
    color: #111827;
}

.story-card p {
    margin: 0;
    color: #475569;
}

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

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

.compact-card h3 {
    min-height: 42px;
    font-size: 15px;
}

.compact-card p {
    min-height: 56px;
    font-size: 13px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 24px;
    border-radius: 22px;
    color: #92400e;
    background: #fffbeb;
    text-align: center;
    font-weight: 800;
}

.site-footer {
    margin-top: 58px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #1f2937, #0f172a);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
    font-size: 24px;
}

.footer-inner p {
    max-width: 560px;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 14px;
}

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav.is-open {
        display: grid;
    }

    .hero-slide,
    .detail-top {
        grid-template-columns: 1fr;
    }

    .hero-track,
    .hero {
        min-height: 860px;
    }

    .hero-poster {
        justify-self: start;
        width: min(340px, 100%);
    }

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

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

    .rank-grid,
    .large-rank-list,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

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

    .hero {
        min-height: 780px;
    }

    .hero-track {
        min-height: 780px;
    }

    .hero-slide {
        gap: 22px;
        padding: 42px 0 100px;
    }

    .hero p,
    .page-hero p,
    .lead-text {
        font-size: 16px;
    }

    .hero-controls {
        bottom: 28px;
    }

    .hero-dots {
        bottom: 40px;
    }

    .content-section,
    .search-section {
        padding: 38px 0;
    }

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

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

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

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

    .page-hero,
    .detail-top {
        padding: 28px;
        border-radius: 26px;
    }

    .category-hero,
    .ranking-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-top {
        gap: 24px;
    }

    .detail-poster {
        max-width: 300px;
    }

    .story-card {
        padding: 22px;
    }

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

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

@media (max-width: 520px) {
    .nav-shell,
    .mobile-nav,
    .hero-track,
    .content-section,
    .search-section,
    .page-hero,
    .breadcrumb,
    .detail-top,
    .player-section,
    .detail-content,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

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

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

    .home-grid .movie-card p {
        display: none;
    }

    .home-grid .movie-card h3 {
        min-height: auto;
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 40px 50px 1fr;
    }

    .rank-item img {
        width: 50px;
        height: 68px;
    }
}
