html {
    min-height: 100%;
    background: #f8fafc;
}

body {
    margin: 0;
    min-height: 100%;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(18px);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

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

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

.logo {
    font-size: 21px;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
    font-weight: 650;
}

.nav-link {
    color: rgba(255, 255, 255, 0.78);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fbbf24;
}

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

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-link.active,
.mobile-link:hover {
    color: #fbbf24;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.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;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.64) 46%, rgba(2, 6, 23, 0.18) 100%);
}

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

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero h2,
.page-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
}

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

.hero-meta {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

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

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

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.32);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(245, 158, 11, 0.84);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

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

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

.search-panel,
.category-strip,
.content-section,
.rank-teaser,
.detail-section,
.category-block {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.search-panel h1,
.search-panel h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.search-panel p {
    margin: 8px 0 0;
    color: #64748b;
}

.search-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}

.search-box span {
    color: #f97316;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
}

.slim-search {
    margin-top: -28px;
}

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

.section-heading.compact {
    align-items: center;
}

.section-heading h2,
.category-block-head h2,
.detail-section h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p,
.category-block-head p {
    max-width: 520px;
    margin: 0;
    color: #64748b;
}

.text-link {
    color: #ea580c;
    font-weight: 900;
}

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

.category-tile {
    min-height: 160px;
    padding: 22px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
}

.category-tile span {
    display: block;
    color: #0f172a;
    font-size: 21px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 12px;
    color: #64748b;
    font-size: 14px;
}

.category-tile div {
    color: #ea580c;
    font-size: 13px;
    line-height: 1.7;
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 22;
    overflow: hidden;
    background: #020617;
}

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

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

.type-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    min-width: 42px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.type-badge {
    left: 12px;
}

.rank-badge {
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent);
}

.play-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: rgba(251, 191, 36, 0.94);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h3 {
    min-height: 52px;
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
}

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

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #64748b;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 750;
}

.rank-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.34), transparent 34%), linear-gradient(135deg, #0f172a, #111827);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
}

.rank-teaser h2 {
    margin: 0;
    font-size: clamp(28px, 5vw, 52px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.rank-teaser p {
    max-width: 680px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.74);
}

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

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: end;
    padding: 44px;
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.32), transparent 30%), linear-gradient(135deg, #020617, #1e293b 58%, #7c2d12);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
}

.small-hero h1 {
    max-width: 960px;
}

.category-block {
    padding: 28px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

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

.wide-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: stretch;
}

.wide-card .poster-link {
    aspect-ratio: auto;
    min-height: 210px;
}

.wide-card h3 {
    min-height: auto;
    font-size: 21px;
}

.detail-hero {
    padding: 28px;
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.28), transparent 34%), linear-gradient(135deg, #020617, #111827 60%, #431407);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 750;
}

.crumbs a:hover {
    color: #fbbf24;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: center;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: flex;
    width: 86px;
    height: 86px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 24px 60px rgba(249, 115, 22, 0.34);
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.player-start span {
    margin-left: 5px;
    font-size: 36px;
}

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

.detail-info h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
    font-size: 13px;
    font-weight: 800;
}

.detail-tags span {
    color: #ffedd5;
    background: rgba(255, 255, 255, 0.11);
}

.detail-section {
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.detail-section p {
    margin: 14px 0 0;
    color: #334155;
    font-size: 17px;
    text-align: justify;
}

.related-section {
    margin-bottom: 54px;
}

.site-footer {
    margin-top: 60px;
    color: #94a3b8;
    background: #020617;
}

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

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

.site-footer p {
    max-width: 460px;
    margin: 12px 0 0;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 14px;
}

[data-search-item].is-hidden {
    display: none;
}

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

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

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

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

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

    .menu-button {
        display: block;
    }

    .hero {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .rank-teaser,
    .section-heading,
    .category-block-head {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .search-panel {
        padding: 22px;
    }

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

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

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

    .wide-card .poster-link {
        min-height: 172px;
    }

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

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

@media (max-width: 520px) {
    .nav-wrap,
    .mobile-nav,
    .search-panel,
    .category-strip,
    .content-section,
    .rank-teaser,
    .detail-section,
    .category-block,
    .page-hero,
    .detail-hero {
        width: min(100% - 20px, 1180px);
    }

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

    .hero h2,
    .page-hero h1 {
        font-size: 38px;
    }

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

    .wide-card .poster-link {
        aspect-ratio: 16 / 22;
    }
}
