:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1e40af;
    --blue-soft: #dbeafe;
    --slate: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f1f5f9 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.logo-text strong,
.footer-logo strong {
    display: block;
    font-size: 21px;
    line-height: 1.1;
}

.logo-text em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: var(--blue-soft);
}

.mobile-nav {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 12px;
    display: none;
    gap: 10px;
    overflow-x: auto;
}

.mobile-nav a {
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
}

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

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

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-bg {
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 35%, rgba(37, 99, 235, 0.36), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.22)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 86px 20px 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: end;
    gap: 46px;
}

.hero-copy {
    max-width: 780px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(37, 99, 235, 0.24);
    border: 1px solid rgba(191, 219, 254, 0.32);
}

.eyebrow.dark {
    color: var(--blue);
    background: var(--blue-soft);
    border-color: #bfdbfe;
}

.hero-copy h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.8;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 14px;
}

.tag-list span {
    color: #334155;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
}

.primary-btn:hover,
.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(37, 99, 235, 0.36);
}

.primary-btn.block {
    width: 100%;
}

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

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: translateY(-8px);
}

.hero-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span,
.play-mark {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
}

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

.hero-dot {
    width: 32px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.active {
    background: #ffffff;
}

.search-band {
    margin-top: -1px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.search-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
    gap: 28px;
    align-items: center;
}

.search-inner h2,
.page-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.14;
    letter-spacing: -0.03em;
}

.search-inner p,
.page-hero p,
.section-intro {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.search-box,
.filter-panel {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box input,
.site-search,
.site-select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

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

.search-box button {
    color: #ffffff;
    background: var(--blue);
}

.page-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 20px 70px;
}

.home-sections {
    display: grid;
    gap: 64px;
}

.page-hero {
    margin-bottom: 34px;
    padding: 42px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 90% 0%, rgba(37, 99, 235, 0.16), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow);
}

.small-hero {
    min-height: 230px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-more {
    color: var(--blue);
    font-weight: 800;
}

.poster-grid,
.movie-grid,
.category-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));
}

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

.poster-card,
.movie-card,
.category-card,
.detail-card,
.side-poster,
.white-panel,
.ranking-panel {
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.poster-card,
.movie-card,
.category-card {
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster-card:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-image,
.movie-image {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-image {
    aspect-ratio: 16 / 9;
}

.poster-image img,
.movie-image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.duration-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.play-mark {
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark,
.poster-card:hover .play-mark {
    opacity: 1;
    transform: scale(1);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 44px;
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    min-height: 44px;
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link:hover h3 {
    color: var(--blue);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #64748b;
    font-size: 13px;
}

.meta-row span,
.detail-meta span,
.detail-meta a {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
}

.meta-row.small {
    font-size: 12px;
}

.white-panel,
.ranking-panel,
.category-showcase {
    padding: 28px;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
}

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

.category-card a {
    position: relative;
    display: block;
    min-height: 230px;
    overflow: hidden;
    color: #ffffff;
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
    transition: transform 0.32s ease;
}

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

.category-card a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.18));
}

.category-card div {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
}

.category-card span {
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
}

.category-card h2 {
    margin: 8px 0;
    font-size: 26px;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.65;
}

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

.ranking-list.large {
    max-width: 980px;
    margin: 0 auto;
}

.rank-item {
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.rank-link {
    display: grid;
    grid-template-columns: 58px 130px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    color: var(--blue);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-link img {
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-link h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.rank-link p {
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.55;
}

.filter-panel {
    margin-top: 24px;
    flex-wrap: wrap;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    padding: 11px 14px;
    border-radius: 999px;
    color: var(--blue);
    background: var(--blue-soft);
    font-weight: 800;
}

.empty-message {
    display: none;
    margin: 28px 0 0;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: var(--radius);
}

.empty-message.visible {
    display: block;
}

.is-hidden {
    display: none !important;
}

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

.breadcrumb a {
    color: var(--blue);
    font-weight: 800;
}

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

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

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(15, 23, 42, 0.28));
}

.player-cover strong {
    max-width: 86%;
    font-size: clamp(18px, 3vw, 30px);
    text-align: center;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.big-play {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.42);
    font-size: 30px;
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: #475569;
    font-size: 14px;
}

.detail-meta a {
    color: var(--blue);
    background: var(--blue-soft);
    font-weight: 800;
}

.lead-text {
    margin: 0 0 26px;
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

.detail-card section {
    margin-top: 28px;
}

.detail-card h2 {
    margin: 0 0 12px;
    font-size: 23px;
}

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

.review-box {
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #dbeafe;
}

.detail-side {
    position: sticky;
    top: 92px;
}

.side-poster {
    padding: 18px;
}

.side-poster img {
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
    margin-bottom: 16px;
}

.side-poster h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.side-poster p {
    color: var(--muted);
    line-height: 1.7;
}

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

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 36px;
}

.footer-logo p {
    max-width: 520px;
    margin: 8px 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

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

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

.site-footer a:hover {
    color: #93c5fd;
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 20px 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        height: auto;
        padding-top: 14px;
        padding-bottom: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .main-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .mobile-nav {
        display: flex;
    }

    .hero-carousel {
        min-height: 680px;
        height: auto;
    }

    .hero-content {
        min-height: 680px;
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: center;
        padding-top: 48px;
        padding-bottom: 78px;
    }

    .hero-poster {
        max-width: 240px;
        transform: none;
    }

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

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

    .page-hero,
    .white-panel,
    .ranking-panel,
    .category-showcase,
    .detail-card {
        padding: 22px;
    }

    .rank-link {
        grid-template-columns: 42px 96px minmax(0, 1fr);
    }

    .rank-link img {
        height: 64px;
    }
}

@media (max-width: 560px) {
    .logo-text em {
        display: none;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

    .search-box,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box button,
    .site-select {
        width: 100%;
    }

    .scroll-row {
        grid-auto-columns: minmax(230px, 86vw);
    }

    .player-shell {
        border-radius: 18px;
    }
}
