* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #1f2937;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f1f5f9 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: 14px;
    box-shadow: 0 14px 25px rgba(37, 99, 235, 0.28);
}

.logo-copy {
    display: grid;
    gap: 2px;
}

.logo-copy strong,
.footer-logo strong {
    font-size: 20px;
    line-height: 1.1;
    color: #1f2937;
}

.logo-copy small,
.footer-logo small {
    font-size: 12px;
    color: #64748b;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
    color: #374151;
}

.nav-link {
    position: relative;
    padding: 26px 0;
    transition: color 0.2s ease;
}

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

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: 18px;
    left: 0;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, #60a5fa, #2563eb);
    border-radius: 999px;
    opacity: 0;
    transform: scaleX(0.3);
    transition: 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: #1e40af;
    cursor: pointer;
    background: #eff6ff;
    border: 0;
    border-radius: 12px;
}

.mobile-nav {
    display: none;
    gap: 8px;
    width: min(1180px, calc(100% - 32px));
    padding: 0 0 14px;
    margin: 0 auto;
    overflow-x: auto;
}

.mobile-pill {
    flex: 0 0 auto;
    padding: 7px 14px;
    font-size: 14px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
}

.mobile-pill.active,
.mobile-pill:hover {
    color: #ffffff;
    background: #2563eb;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.035);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    z-index: 1;
    opacity: 1;
    transform: scale(1);
}

.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.92) 0%, rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.18) 100%);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #2563eb;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #bfdbfe;
}

.hero-content h1 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.65;
    color: #e5e7eb;
}

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

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

.primary-button {
    color: #ffffff;
    background: #2563eb;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.35);
}

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

.primary-button:hover {
    background: #1d4ed8;
}

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

.ghost-button.light {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.hero-controls {
    position: absolute;
    right: 50%;
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 10px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(50%);
}

.hero-dot {
    width: 38px;
    height: 5px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.38);
    border: 0;
    border-radius: 999px;
    transition: 0.2s ease;
}

.hero-dot.is-active {
    width: 64px;
    background: #ffffff;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.section-block {
    margin: 0 0 64px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
    color: #1f2937;
}

.section-heading a {
    flex: 0 0 auto;
    font-weight: 800;
    color: #2563eb;
}

.section-heading.compact h2 {
    max-width: 760px;
    font-size: 18px;
    line-height: 1.7;
    color: #64748b;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    margin-bottom: 48px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.search-panel h2 {
    margin: 0;
    font-size: 24px;
}

.search-panel label {
    display: grid;
    gap: 8px;
    font-weight: 800;
    color: #475569;
}

.search-panel input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    outline: 0;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.poster-grid,
.movie-grid,
.rank-grid,
.category-overview-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

.movie-card,
.rank-card,
.category-card,
.detail-card,
.side-card,
.poster-panel,
.search-panel,
.category-strip {
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.movie-card,
.rank-card,
.category-card,
.category-strip {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.84);
    border-radius: 18px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.rank-card:hover,
.category-card:hover {
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
    transform: translateY(-4px);
}

.movie-link {
    display: grid;
    height: 100%;
    grid-template-rows: auto 1fr;
}

.thumb,
.poster-frame,
.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.thumb {
    aspect-ratio: 16 / 9;
}

.poster-frame {
    aspect-ratio: 3 / 4;
}

.thumb img,
.poster-frame img,
.rank-cover img,
.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.thumb-shade,
.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.02) 62%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .thumb-shade,
.movie-card:hover .poster-gradient {
    opacity: 1;
}

.duration-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.82);
    border-radius: 8px;
}

.play-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: 0.22s ease;
}

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

.movie-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.movie-body strong,
.poster-link strong,
.rank-copy strong {
    color: #1f2937;
    transition: color 0.2s ease;
}

.movie-card:hover strong,
.rank-card:hover strong,
.category-card:hover strong {
    color: #2563eb;
}

.movie-meta,
.poster-link em,
.rank-copy em,
.rank-copy small {
    font-size: 13px;
    color: #64748b;
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.tag-row span,
.detail-tags a {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
}

.poster-link {
    display: grid;
    gap: 8px;
    padding: 0 0 14px;
}

.poster-link strong,
.poster-link em {
    padding: 0 14px;
}

.poster-link strong {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.scroll-row {
    display: grid;
    grid-auto-columns: 220px;
    grid-auto-flow: column;
    gap: 18px;
    padding: 4px 4px 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.latest-block {
    padding: 28px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
    gap: 24px;
}

.large-feature {
    position: relative;
    min-height: 470px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.large-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.large-feature::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 70%);
}

.large-feature span {
    position: absolute;
    right: 28px;
    bottom: 28px;
    left: 28px;
    z-index: 2;
    display: grid;
    gap: 12px;
}

.large-feature em {
    font-style: normal;
    font-weight: 800;
    color: #bfdbfe;
}

.large-feature strong {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
}

.large-feature small {
    max-width: 680px;
    font-size: 16px;
    line-height: 1.7;
    color: #e5e7eb;
}

.feature-side {
    display: grid;
    gap: 20px;
}

.rank-card a {
    display: grid;
    grid-template-columns: auto 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    width: 42px;
    font-size: 24px;
    font-weight: 900;
    color: #2563eb;
    text-align: center;
}

.rank-cover {
    width: 92px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.rank-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.rank-copy strong,
.rank-copy em,
.rank-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-strip {
    padding: 26px;
    margin-bottom: 34px;
    border-radius: 24px;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 54px;
    margin-bottom: 40px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e3a8a, #2563eb 48%, #0f172a);
    border-radius: 30px;
    box-shadow: 0 24px 60px rgba(30, 64, 175, 0.22);
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.06;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 18px;
    line-height: 1.75;
    color: #dbeafe;
}

.page-hero .eyebrow {
    color: #dbeafe;
}

.inline-actions {
    margin-top: 26px;
}

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

.category-card a {
    display: grid;
    height: 100%;
}

.category-covers {
    display: grid;
    height: 220px;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    background: #0f172a;
}

.category-copy {
    display: grid;
    gap: 12px;
    padding: 22px;
}

.category-copy strong {
    font-size: 24px;
}

.category-copy em {
    min-height: 74px;
    font-style: normal;
    line-height: 1.7;
    color: #64748b;
}

.category-copy small {
    font-weight: 900;
    color: #2563eb;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    font-weight: 700;
    color: #64748b;
}

.breadcrumb a:hover {
    color: #2563eb;
}

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

.detail-main {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.24);
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(2, 6, 23, 0.56));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-shell.is-playing .player-overlay {
    visibility: hidden;
    opacity: 0;
}

.player-play {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    padding-left: 6px;
    font-size: 30px;
    color: #ffffff;
    cursor: pointer;
    background: #2563eb;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-play:hover {
    background: #1d4ed8;
    transform: scale(1.06);
}

.player-error {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: none;
    padding: 8px 12px;
    font-size: 13px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.86);
    border-radius: 10px;
}

.video-shell.has-error .player-error {
    display: block;
}

.detail-card,
.side-card,
.poster-panel {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
}

.detail-card {
    padding: 30px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.08;
}

.lead-text {
    margin: 0 0 22px;
    font-size: 18px;
    line-height: 1.75;
    color: #475569;
}

.detail-card section {
    padding-top: 26px;
    margin-top: 26px;
    border-top: 1px solid #e2e8f0;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    line-height: 1.9;
    color: #374151;
}

.detail-meta span {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

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

.poster-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
    text-align: center;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
}

.poster-panel strong {
    font-size: 20px;
}

.poster-panel span {
    color: #64748b;
}

.poster-panel a {
    display: inline-flex;
    justify-content: center;
    padding: 10px 14px;
    font-weight: 900;
    color: #ffffff;
    background: #2563eb;
    border-radius: 999px;
}

.side-card {
    padding: 22px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.side-card dt {
    color: #64748b;
}

.side-card dd {
    margin: 0;
    font-weight: 700;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    padding: 48px 0 28px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 34px;
}

.footer-logo strong {
    color: #ffffff;
}

.footer-logo small,
.footer-brand p,
.site-footer a,
.footer-bottom {
    color: #cbd5e1;
}

.footer-brand p {
    max-width: 520px;
    line-height: 1.8;
}

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

.site-footer ul {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

.footer-bottom {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding-top: 24px;
    font-size: 14px;
    border-top: 1px solid rgba(203, 213, 225, 0.18);
}

.footer-bottom p {
    margin: 0;
}

.js-card.is-hidden {
    display: none;
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .mobile-nav {
        display: none;
    }

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .logo-copy small {
        display: none;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 80px;
    }

    .hero-meta span {
        font-size: 12px;
    }

    .page-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 30px;
    }

    .section-heading,
    .search-panel,
    .footer-bottom {
        align-items: start;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .feature-side {
        gap: 16px;
    }

    .large-feature {
        min-height: 380px;
    }

    .rank-card a {
        grid-template-columns: auto 72px 1fr;
    }

    .rank-cover {
        width: 72px;
    }

    .page-hero {
        padding: 32px;
        border-radius: 24px;
    }

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

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

@media (max-width: 520px) {
    .poster-grid,
    .movie-grid,
    .full-grid,
    .rank-grid,
    .large-rank-grid,
    .category-overview-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .scroll-row {
        grid-auto-columns: 76%;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-actions,
    .inline-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }
}
