:root {
    --site-blue: #2563eb;
    --site-blue-dark: #1d4ed8;
    --site-red: #ef4444;
    --site-green: #16a34a;
    --site-text: #111827;
    --site-muted: #6b7280;
    --site-border: #e5e7eb;
    --site-bg: #f8fafc;
    --site-card: #ffffff;
    --site-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--site-bg);
    color: var(--site-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    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: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--site-blue), #7c3aed);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

.logo-text {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover {
    color: var(--site-blue);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: 14px;
    background: #eff6ff;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 10px;
    background: var(--site-blue);
}

.mobile-nav {
    display: none;
    padding: 10px 24px 18px;
    border-top: 1px solid var(--site-border);
    background: #ffffff;
}

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

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #0f172a;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.20) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-overlay {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, var(--site-bg), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding: 88px 0 118px;
    color: #ffffff;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    color: #dbeafe;
    font-weight: 750;
}

.page-kicker {
    color: var(--site-blue);
    background: #eff6ff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 800;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
}

.tag-row span,
.detail-meta span {
    background: #eff6ff;
    color: var(--site-blue-dark);
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

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

.primary-button {
    background: linear-gradient(135deg, var(--site-blue), #7c3aed);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 34px;
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    transition: width 0.2s ease, background 0.2s ease;
}

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

main,
.page-main,
.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.content-section {
    margin-top: 56px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--site-muted);
}

.section-more {
    flex: 0 0 auto;
    color: var(--site-blue);
    font-weight: 750;
}

.search-section {
    margin-top: -38px;
    position: relative;
    z-index: 5;
}

.search-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--site-shadow);
}

.search-box input {
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border: 1px solid var(--site-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--site-text);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: var(--site-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 750;
}

.filter-button.is-active,
.filter-button:hover {
    background: var(--site-blue);
    color: #ffffff;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: var(--site-card);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--site-shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

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

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.9);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.card-content {
    padding: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--site-muted);
    font-size: 12px;
    font-weight: 700;
}

.card-content h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 850;
}

.card-content p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--site-muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-category {
    display: inline-flex;
    margin-top: 12px;
    color: var(--site-blue);
    font-size: 13px;
    font-weight: 800;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
}

.movie-card-horizontal .poster-link {
    height: 100%;
    min-height: 150px;
}

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

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

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

.category-card {
    position: relative;
    min-height: 172px;
    overflow: hidden;
    display: flex;
    align-items: end;
    border-radius: 24px;
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.category-image {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.18)), var(--category-image);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image {
    transform: scale(1.06);
}

.category-body {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 8px;
    padding: 20px;
    color: #ffffff;
}

.category-body strong {
    font-size: 22px;
    font-weight: 900;
}

.category-body em {
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.6;
    font-style: normal;
}

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

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

.ranking-item {
    position: relative;
    display: grid;
    grid-template-columns: 94px 52px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.ranking-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #eff6ff;
}

.ranking-rank {
    font-size: 28px;
    font-weight: 950;
    color: var(--site-blue);
}

.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 850;
}

.ranking-info p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--site-muted);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    position: relative;
    min-height: 330px;
    display: flex;
    align-items: center;
    margin-top: 32px;
    overflow: hidden;
    border-radius: 32px;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.90), rgba(30, 64, 175, 0.58)), var(--page-hero-image);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    box-shadow: var(--site-shadow);
}

.small-hero {
    background: linear-gradient(135deg, #172554, #1d4ed8 54%, #7c3aed);
}

.page-hero > div {
    max-width: 760px;
    padding: 48px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

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

.breadcrumb a {
    color: var(--site-blue);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: var(--site-shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    background: #eff6ff;
}

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

.detail-one-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: #475569;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    margin-top: 34px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
    color: #ffffff;
    cursor: pointer;
}

.play-cover span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    font-size: 30px;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
}

.play-cover strong {
    font-size: 22px;
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    margin-top: 34px;
}

.detail-article,
.detail-side {
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 900;
}

.detail-article p {
    margin: 0 0 24px;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side div {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f7;
}

.detail-side dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: #111827;
    font-weight: 750;
    line-height: 1.55;
}

.site-footer {
    margin-top: 60px;
    padding: 44px 24px;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

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

.footer-inner p {
    max-width: 760px;
    margin: 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: #e0f2fe;
    font-weight: 750;
}

.is-filtered-out,
.is-search-hidden {
    display: none !important;
}

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

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

    .horizontal-list,
    .ranking-list,
    .wide-ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-slider {
        min-height: 76vh;
    }

    .hero-content {
        margin: 0;
        padding: 72px 24px 118px;
    }

    .hero-arrow {
        display: none;
    }

    main,
    .page-main,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .horizontal-list,
    .ranking-list,
    .wide-ranking-list,
    .large-category-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 104px 1fr;
    }

    .ranking-item {
        grid-template-columns: 86px 46px 1fr;
    }

    .page-hero > div {
        padding: 34px 24px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 18px;
    }

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

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

@media (max-width: 520px) {
    .header-inner {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 18px;
    }

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

    .hero-content p,
    .page-hero p,
    .detail-one-line {
        font-size: 15px;
    }

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

    .card-content {
        padding: 12px;
    }

    .card-content h3 {
        font-size: 14px;
    }

    .tag-row span:nth-child(n+3) {
        display: none;
    }

    .ranking-item {
        grid-template-columns: 74px 1fr;
    }

    .ranking-rank {
        position: absolute;
        left: 10px;
        top: 10px;
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(37, 99, 235, 0.9);
        color: #ffffff;
        font-size: 14px;
    }

    .detail-article,
    .detail-side {
        padding: 20px;
    }
}
