:root {
    --site-primary: #0284c7;
    --site-primary-dark: #0369a1;
    --site-accent: #f59e0b;
    --site-bg: #f8fafc;
    --site-panel: #ffffff;
    --site-text: #0f172a;
    --site-muted: #64748b;
    --site-border: #e2e8f0;
    --site-dark: #020617;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--site-bg);
    color: var(--site-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    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;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: #0f172a;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7 54%, #f59e0b);
    color: #fff;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
}

.brand:hover {
    color: var(--site-primary);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.primary-nav a,
.mobile-nav a {
    border-radius: 12px;
    padding: 10px 14px;
    color: #334155;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.primary-nav a:hover,
.mobile-nav a:hover {
    background: #f0f9ff;
    color: var(--site-primary);
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    width: min(280px, 24vw);
}

.header-search input,
.filter-input,
.select-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding: 10px 14px 10px 38px;
}

.header-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    transform: translateY(-50%);
}

.header-search input:focus,
.filter-input:focus,
.select-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #0f172a;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid #e2e8f0;
    padding: 10px 0 16px;
}

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

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    background: #020617;
    color: #fff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.18)), var(--hero-image);
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-slide::after {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    content: "";
    background: linear-gradient(0deg, #020617, rgba(2, 6, 23, 0));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 80px 0 118px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    font-size: 14px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero-content h1,
.hero-content h2 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 720px;
    margin: 20px 0 0;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
}

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

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    box-shadow: 0 16px 30px rgba(2, 132, 199, 0.28);
}

.btn-light {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(12px);
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: #fff;
}

.section {
    padding: 58px 0;
}

.section.tight {
    padding-top: 34px;
}

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

.section-heading h2,
.page-title h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-title p,
.category-intro,
.movie-summary {
    margin: 10px 0 0;
    color: #64748b;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: var(--shadow-soft);
    transform: translateY(-5px);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #0f172a;
}

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

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

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

.poster-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.rank-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.card-body h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.3;
}

.card-body h3 a:hover {
    color: var(--site-primary);
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span,
.text-tag {
    border-radius: 999px;
    padding: 5px 9px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 24px;
    background: #020617;
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.35s ease;
}

.category-card-content {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0));
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 25px;
}

.category-card p {
    margin: 10px 0 0;
    color: #e2e8f0;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0;
    background: radial-gradient(circle at 16% 20%, rgba(14, 165, 233, 0.25), transparent 34%), linear-gradient(135deg, #020617, #0f172a 54%, #075985);
    color: #fff;
}

.page-title h1 {
    color: #fff;
}

.page-title p {
    max-width: 780px;
    color: #dbeafe;
    font-size: 18px;
}

.filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 14px;
    margin: 0 0 26px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-input,
.select-input {
    padding: 12px 14px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 76px 110px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.ranking-index {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.ranking-thumb {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 4 / 3;
    background: #0f172a;
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info h2,
.ranking-info h3 {
    margin: 0;
    font-size: 20px;
}

.ranking-info p {
    margin: 6px 0 0;
    color: #64748b;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
}

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

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.16));
    color: #fff;
    cursor: pointer;
}

.video-shell.is-playing .play-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.9);
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.4);
    font-size: 36px;
    transform: translateX(2px);
}

.detail-card {
    padding: 26px;
}

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

.detail-card p {
    margin: 0 0 16px;
    color: #334155;
    line-height: 1.85;
}

.movie-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.movie-fact {
    border-radius: 16px;
    padding: 12px;
    background: #f8fafc;
}

.movie-fact strong {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.movie-fact span {
    color: #0f172a;
    font-weight: 900;
}

.side-card {
    padding: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
    background: #020617;
}

.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.related-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
}

.related-card .movie-poster {
    aspect-ratio: 4 / 3;
}

.related-card h3 {
    margin: 0;
    padding: 12px 12px 4px;
    font-size: 16px;
}

.related-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    padding: 0 12px 12px;
    color: #64748b;
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.no-results {
    display: none;
    border: 1px dashed #94a3b8;
    border-radius: 20px;
    padding: 24px;
    background: #fff;
    color: #64748b;
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer p {
    margin: 0;
}

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

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

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 18px 0;
    color: #64748b;
}

@media (max-width: 1080px) {
    .primary-nav,
    .header-search {
        display: none;
    }

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

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

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

@media (max-width: 760px) {
    .site-container {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-content {
        padding: 62px 0 108px;
    }

    .section-heading {
        display: block;
    }

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

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

    .ranking-item {
        grid-template-columns: 48px 84px minmax(0, 1fr);
    }

    .ranking-item .btn {
        grid-column: 1 / -1;
    }

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

    .movie-facts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

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

    .card-body h3 {
        font-size: 17px;
    }
}
