:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.24);
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --deep: #0f172a;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f1f5f9 100%);
    color: var(--ink);
    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%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #2563eb 0%, #0891b2 52%, #0d9488 100%);
    box-shadow: 0 10px 30px rgba(14, 116, 144, 0.28);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-mark::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 9px;
    border-left: 12px solid #ffffff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link-active {
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 10px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slides {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(14px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.32;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 24%, rgba(6, 182, 212, 0.42), transparent 32%),
        radial-gradient(circle at 25% 70%, rgba(37, 99, 235, 0.50), transparent 32%),
        linear-gradient(115deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.62));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 56px;
    align-items: center;
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 84px 0 108px;
    color: #ffffff;
}

.hero-kicker,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    margin-bottom: 14px;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(226, 232, 240, 0.94);
    font-size: clamp(18px, 2.5vw, 24px);
    line-height: 1.6;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.12);
    color: #0891b2;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.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: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.35);
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

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

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    inset: auto 18px 18px 18px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22d3ee, #60a5fa);
}

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

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

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

.search-band {
    width: min(1200px, calc(100% - 32px));
    margin: -48px auto 0;
    position: relative;
    z-index: 5;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 440px);
    gap: 24px;
    align-items: center;
    border-radius: 28px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.035em;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    border-radius: 18px;
    background: #f1f5f9;
    padding: 0 18px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.30);
}

.search-input span {
    color: #0891b2;
    font-weight: 800;
}

.search-input input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font-size: 16px;
}

.section {
    width: min(1200px, calc(100% - 32px));
    margin: 76px auto;
}

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

.section-head h2 {
    font-size: clamp(28px, 3vw, 38px);
}

.section-head a {
    color: #2563eb;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.72));
    opacity: 0.72;
}

.poster-play,
.player-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.poster-play::after,
.player-play-icon::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 17px;
    border-left: 18px solid #0891b2;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

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

.poster-meta,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 9px;
}

.poster-meta {
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.movie-card-body {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card:hover .movie-title {
    color: #0891b2;
}

.movie-line {
    display: -webkit-box;
    min-height: 38px;
    margin: 8px 0 12px;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    padding: 22px;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
    box-shadow: var(--soft-shadow);
}

.category-tile strong,
.category-tile p,
.category-count {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    display: block;
    margin-top: 22px;
    color: #0f172a;
    font-size: 22px;
}

.category-tile p {
    color: #475569;
    line-height: 1.55;
}

.category-count {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #0891b2;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.category-tile img {
    position: absolute;
    right: -22px;
    bottom: -32px;
    width: 118px;
    height: 176px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
    transform: rotate(9deg);
}

.category-strip {
    border-radius: 30px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
    padding: 34px;
}

.page-main,
.detail-main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero {
    margin: 44px 0 40px;
    border-radius: 30px;
    padding: 52px;
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.28), transparent 30%),
        linear-gradient(135deg, #eff6ff, #ecfeff);
    box-shadow: var(--soft-shadow);
}

.page-hero h1 {
    margin-bottom: 14px;
    font-size: clamp(36px, 6vw, 64px);
}

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

.page-search {
    max-width: 620px;
    margin-top: 28px;
    background: #ffffff;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    border-radius: 24px;
    background: #ffffff;
    padding: 18px;
    box-shadow: var(--soft-shadow);
}

.category-overview-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #e2e8f0;
}

.category-overview-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.category-overview-card h2 {
    margin: 8px 0 8px;
}

.category-overview-card p {
    color: #64748b;
    line-height: 1.6;
}

.category-overview-card ul {
    display: grid;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.category-overview-card li a {
    color: #2563eb;
    font-weight: 700;
}

.ranking-section {
    border-radius: 30px;
    background: #0f172a;
    padding: 34px;
}

.ranking-section .section-head h2,
.ranking-section .section-head a {
    color: #ffffff;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 68px 1fr;
    gap: 14px;
    align-items: center;
    border-radius: 18px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-section .ranking-row {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    color: #ffffff;
    font-weight: 900;
}

.ranking-thumb {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background: #e2e8f0;
}

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

.ranking-info a {
    color: #0f172a;
    font-size: 17px;
    font-weight: 900;
}

.ranking-section .ranking-info a,
.ranking-section .ranking-info span {
    color: #ffffff;
}

.ranking-info p {
    display: -webkit-box;
    margin: 6px 0;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-section .ranking-info p {
    color: #cbd5e1;
}

.ranking-info span {
    color: #64748b;
    font-size: 12px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
    border-radius: 34px;
    padding: 34px;
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.24), transparent 32%),
        linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    background: #e2e8f0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-line {
    margin: 18px 0 24px;
    color: #475569;
    font-size: 19px;
    line-height: 1.7;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.meta-grid div {
    border-radius: 16px;
    background: #ffffff;
    padding: 14px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.20);
}

.meta-grid dt {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.meta-grid dd {
    margin: 6px 0 0;
    color: #0f172a;
    font-weight: 900;
}

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

.player-section,
.detail-content,
.related-section {
    margin: 46px 0;
}

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

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

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

.player-box.is-playing .player-overlay {
    display: none;
}

.player-overlay .player-play-icon {
    position: relative;
    left: auto;
    top: auto;
    display: block;
    opacity: 1;
    transform: none;
}

.source-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.source-tabs button {
    border: 0;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
}

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

.detail-content article {
    border-radius: 24px;
    background: #ffffff;
    padding: 28px;
    box-shadow: var(--soft-shadow);
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content p {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.9;
}

.empty-state {
    grid-column: 1 / -1;
    border-radius: 24px;
    background: #ffffff;
    color: #64748b;
    padding: 38px;
    text-align: center;
    box-shadow: var(--soft-shadow);
}

.site-footer {
    margin-top: 80px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    line-height: 1.75;
}

.site-footer h2 {
    color: #67e8f9;
    font-size: 18px;
}

.site-footer a {
    display: block;
    margin: 10px 0;
    color: #cbd5e1;
}

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

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

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

    .full-ranking {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.96);
        padding: 12px;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        padding: 14px;
        border-radius: 14px;
    }

    .hero,
    .hero-slides {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 52px;
    }

    .hero-poster {
        width: min(280px, 80vw);
        margin: 0 auto;
        transform: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

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

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

    .detail-poster {
        width: min(320px, 100%);
        margin: 0 auto;
    }

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 20px;
    }

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

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

    .section,
    .page-main,
    .detail-main {
        width: min(100% - 22px, 1200px);
    }

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

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

    .movie-card-body {
        padding: 12px;
    }

    .page-hero,
    .category-strip,
    .ranking-section,
    .detail-hero {
        padding: 24px;
        border-radius: 24px;
    }

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

    .ranking-row {
        grid-template-columns: 44px 56px 1fr;
    }

    .ranking-number {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }
}
