:root {
    --bg-start: #f8fafc;
    --bg-mid: #eff6ff;
    --bg-end: #f1f5f9;
    --text-main: #0f172a;
    --text-soft: #64748b;
    --text-muted: #94a3b8;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #0891b2;
    --line: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--bg-start), var(--bg-mid), var(--bg-end));
    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;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    height: 76px;
    margin: 0 auto;
    padding: 0 24px;
}

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

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

.brand-text strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    color: transparent;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-text em {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
}

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

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

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

.mobile-link {
    padding: 12px 14px;
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
}

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

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.46) 45%, rgba(2, 6, 23, 0.08));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: min(1120px, calc(100% - 40px));
    transform: translateX(-50%);
    color: #ffffff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #bfdbfe;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

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

.primary-btn:hover,
.wide-btn:hover,
.reset-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #ffffff;
    border: 0;
    background: rgba(0, 0, 0, 0.48);
    border-radius: 50%;
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.section-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

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

.section-head h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 3vw, 36px);
}

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

.search-panel,
.category-band,
.ranking-panel,
.detail-article,
.detail-side,
.filter-toolbar,
.category-card,
.page-hero-inner {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.86);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(14px);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius-lg);
}

.search-panel h2,
.search-panel p,
.page-hero h1,
.page-hero p {
    margin: 0;
}

.search-panel p,
.page-hero p,
.category-card p,
.detail-one-line {
    color: var(--text-soft);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text-main);
}

.feature-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 280px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

.feature-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 18px;
    scroll-snap-align: start;
    box-shadow: var(--soft-shadow);
}

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

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

.feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.05));
}

.feature-title,
.feature-meta {
    position: absolute;
    left: 16px;
    right: 16px;
    color: #ffffff;
}

.feature-title {
    bottom: 42px;
    font-size: 18px;
    font-weight: 800;
}

.feature-meta {
    bottom: 18px;
    color: #cbd5e1;
    font-size: 13px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 18px;
    box-shadow: var(--soft-shadow);
}

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

.play-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.44);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 800;
}

.movie-card:hover .play-mask {
    opacity: 1;
}

.badge {
    position: absolute;
    z-index: 2;
    max-width: calc(100% - 20px);
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.badge-top {
    top: 10px;
    left: 10px;
}

.badge-bottom {
    right: 10px;
    bottom: 10px;
    background: var(--blue);
}

.card-info {
    padding: 12px 3px 0;
}

.card-info h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.35;
}

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

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

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

.meta-row {
    margin-top: 9px;
    color: var(--text-soft);
    font-size: 13px;
}

.tag-row,
.detail-tags {
    margin-top: 10px;
}

.tag-row span,
.detail-tags span {
    padding: 4px 8px;
    color: var(--blue-dark);
    background: #eff6ff;
    border-radius: 999px;
    font-size: 12px;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: var(--radius-lg);
}

.small-head {
    margin-bottom: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: #f8fafc;
}

.rank-num {
    color: var(--blue);
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    color: var(--text-soft);
    font-size: 12px;
    font-style: normal;
}

.wide-btn {
    width: 100%;
    margin-top: 18px;
}

.category-band {
    margin-top: 56px;
    padding: 34px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(236, 254, 255, 0.92));
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
    font-weight: 800;
}

.category-pills span {
    color: var(--text-soft);
    font-size: 12px;
}

.page-hero {
    padding: 58px 24px 0;
}

.page-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px;
    border-radius: var(--radius-lg);
}

.compact-hero h1 {
    color: var(--text-main);
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.category-card a {
    display: block;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: 210px;
    overflow: hidden;
}

.category-thumbs img {
    width: 100%;
    height: 105px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-body {
    padding: 20px;
}

.category-body h2 {
    margin: 6px 0 8px;
}

.category-count {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-radius: 20px;
}

.wide-search {
    flex: 1 1 360px;
}

.filter-toolbar select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 999px;
    outline: none;
}

.reset-btn {
    min-height: 46px;
    color: var(--blue-dark);
    background: #eff6ff;
}

.filter-hint {
    color: var(--text-soft);
    font-size: 14px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.ranking-poster img {
    width: 120px;
    height: 160px;
    object-fit: cover;
}

.ranking-number {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 8px;
    color: #ffffff;
    background: var(--blue);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.ranking-content h2 {
    margin: 2px 0 8px;
}

.ranking-content p {
    margin: 0;
    color: var(--text-soft);
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
}

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

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) scale(1.05);
}

.detail-shade {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.32));
}

.detail-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    max-width: 1200px;
    min-height: 620px;
    margin: 0 auto;
    padding: 80px 24px 72px;
}

.detail-poster img {
    width: 300px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

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

.detail-one-line {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

.detail-meta {
    margin: 18px 0 8px;
}

.detail-meta span {
    padding: 7px 12px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.player-section {
    scroll-margin-top: 90px;
}

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

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.32), rgba(2, 6, 23, 0.56));
    cursor: pointer;
}

.player-start.hidden {
    display: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    background: var(--blue);
    border-radius: 50%;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.36);
}

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

.detail-article,
.detail-side {
    padding: 28px;
    border-radius: var(--radius-lg);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 12px;
}

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

.detail-side dl {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.detail-side dt {
    color: var(--text-soft);
}

.detail-side dd {
    margin: 0;
    min-width: 0;
}

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

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

.compact-card .card-info p,
.compact-card .tag-row {
    display: none;
}

.site-footer {
    margin-top: 80px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.footer-logo {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 900;
}

.footer-about p,
.footer-bottom,
.footer-column a {
    color: #cbd5e1;
}

.footer-column {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-column h3 {
    margin: 0 0 8px;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

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

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

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

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

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .nav-wrap {
        height: 66px;
        padding: 0 16px;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .brand-text em {
        display: none;
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        bottom: 68px;
    }

    .hero-arrow {
        display: none;
    }

    .section-wrap {
        padding: 38px 16px 0;
    }

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

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

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

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

    .ranking-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .ranking-poster img {
        width: 92px;
        height: 124px;
    }

    .detail-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: end;
        padding: 54px 16px 42px;
    }

    .detail-poster img {
        width: 180px;
    }

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

    .detail-article,
    .detail-side,
    .page-hero-inner {
        padding: 24px;
    }

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

@media (max-width: 460px) {
    .movie-grid,
    .large-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .feature-strip {
        grid-auto-columns: 82%;
    }

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

    .detail-meta span {
        font-size: 13px;
    }
}
