:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --paper-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --orange: #f97316;
    --red: #ef4444;
    --dark: #020617;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.97), rgba(15, 23, 42, 0.98));
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(14px);
}

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

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

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38);
}

.brand-text strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand-text em {
    display: block;
    margin-top: 3px;
    color: #67e8f9;
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #e2e8f0;
    font-weight: 600;
    white-space: nowrap;
}

.main-nav a,
.mobile-panel a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #67e8f9;
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.top-search input,
.mobile-search input {
    width: 190px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 10px 14px;
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(226, 232, 240, 0.72);
}

.top-search button,
.mobile-search button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 10px 16px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    color: #e2e8f0;
    padding: 12px 0;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 48%, #083344);
}

.hero-slides,
.hero-slide,
.hero-image-layer {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image-layer {
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.74), rgba(8, 47, 73, 0.44)), var(--hero-image);
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
}

.hero-glow {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background: radial-gradient(circle at 30% 25%, #22d3ee 0, transparent 28%), radial-gradient(circle at 80% 70%, #2563eb 0, transparent 32%);
    animation: glowPulse 5s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.08);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 600px;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 58px;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.section-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    border: 1px solid rgba(103, 232, 249, 0.35);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(8, 47, 73, 0.38);
    padding: 6px 13px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    padding: 6px 11px;
    color: #e0f2fe;
    font-size: 13px;
}

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

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

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

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

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

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    padding: 7px 14px;
    font-weight: 800;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: #67e8f9;
}

.intro-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.intro-strip div,
.intro-strip a {
    min-height: 86px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    padding: 18px;
}

.intro-strip strong {
    display: block;
    color: var(--blue);
    font-size: 28px;
    line-height: 1;
}

.intro-strip span,
.intro-strip a {
    color: var(--muted);
    font-weight: 700;
}

.section-block,
.split-section,
.detail-content,
.player-section {
    margin-top: 64px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-link,
.poster-wrap,
.movie-body,
.movie-meta,
.card-category {
    display: block;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 34%, rgba(2, 6, 23, 0.68));
    opacity: 0.78;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.82);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.type-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

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

.movie-body {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #1e293b;
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 8px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
}

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

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #0e7490;
    background: #ecfeff;
}

.card-category {
    border-top: 1px solid var(--line);
    color: var(--blue);
    background: #f8fafc;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 800;
}

.split-section {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 24px;
}

.feature-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--paper);
    box-shadow: var(--shadow);
    padding: 26px;
}

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

.home-rank-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    background: #f8fafc;
    padding: 12px;
}

.home-rank-item span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.home-rank-item strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-rank-item em {
    color: var(--blue);
    font-style: normal;
    font-weight: 800;
}

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

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

.category-tile,
.category-card a {
    position: relative;
    display: grid;
    min-height: 180px;
    align-content: end;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.88)), var(--tile-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    padding: 20px;
}

.category-tile span,
.category-name {
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong,
.category-card strong {
    color: #67e8f9;
    font-size: 15px;
}

.category-tile em,
.category-card p {
    margin: 8px 0 0;
    color: #cbd5e1;
    font-style: normal;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-card div span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 5px 9px;
    font-size: 12px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 52%, #083344);
}

.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.72), rgba(8, 47, 73, 0.35)), var(--page-image, var(--detail-image));
    background-position: center;
    background-size: cover;
    opacity: 0.84;
}

.page-hero .container,
.detail-hero-inner {
    position: relative;
    z-index: 1;
}

.page-hero .container {
    padding: 86px 0 76px;
}

.small-hero .container {
    padding: 70px 0 62px;
}

.page-hero h1,
.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-copy p {
    max-width: 780px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 210px 180px auto;
    gap: 16px;
    align-items: end;
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--paper);
    box-shadow: var(--shadow);
    padding: 20px;
}

.filter-panel label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    background: #f8fafc;
    outline: 0;
    padding: 12px 14px;
}

.visible-count {
    margin: 0;
    border-radius: 16px;
    color: var(--blue);
    background: #eff6ff;
    padding: 12px 16px;
    font-weight: 900;
    white-space: nowrap;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    min-height: 560px;
    padding: 72px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 7px 12px;
    font-weight: 700;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
    z-index: 2;
}

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

.player-cover-bg,
.player-cover-shade {
    position: absolute;
    inset: 0;
}

.player-cover-bg {
    background-position: center;
    background-size: cover;
    filter: blur(2px) brightness(0.78);
    transform: scale(1.04);
}

.player-cover-shade {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14), rgba(2, 6, 23, 0.82));
}

.player-button {
    position: relative;
    z-index: 2;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.4);
    font-size: 28px;
}

.player-cover strong {
    position: relative;
    z-index: 2;
    margin-top: 120px;
    font-size: clamp(20px, 4vw, 32px);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
}

.detail-content article,
.detail-content aside {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--paper);
    box-shadow: var(--shadow);
    padding: 28px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
    line-height: 1.2;
}

.detail-content p {
    margin: 0 0 22px;
    color: #334155;
    font-size: 17px;
}

.detail-content dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-content dt {
    color: var(--muted);
    font-weight: 700;
}

.detail-content dd {
    margin: 0;
    color: #1e293b;
    font-weight: 800;
}

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

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617, #0f172a 48%, #082f49);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0 32px;
}

.footer-brand strong,
.site-footer h2 {
    color: #ffffff;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer p {
    max-width: 430px;
    margin: 18px 0 0;
    color: #94a3b8;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #94a3b8;
    text-align: center;
    padding: 18px;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 260px;
    }

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

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

@media (max-width: 840px) {
    .top-search {
        display: none;
    }

    .header-inner {
        min-height: 68px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        display: flex;
        align-items: center;
    }

    .hero-poster {
        display: none;
    }

    .intro-strip,
    .split-section,
    .detail-hero-inner,
    .detail-content,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .intro-strip {
        margin-top: 22px;
    }

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

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

    .detail-poster {
        max-width: 260px;
    }
}

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

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

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

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

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

    .home-rank-item {
        grid-template-columns: 36px 1fr;
    }

    .home-rank-item em {
        grid-column: 2;
    }

    .detail-content article,
    .detail-content aside,
    .feature-panel {
        padding: 20px;
    }
}
