* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: #f8fafc;
    color: #1f2937;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #0d9488 0%, #0891b2 50%, #2563eb 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-text {
    font-size: 21px;
}

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

.nav-link,
.mobile-link {
    border-radius: 12px;
    transition: background 0.22s ease, transform 0.22s ease;
}

.nav-link {
    padding: 9px 15px;
    font-size: 14px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    background: rgba(255, 255, 255, 0.18);
}

.nav-link.is-active {
    transform: translateY(-1px);
}

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

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

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

.mobile-link {
    padding: 11px 13px;
    font-weight: 700;
}

.hero {
    background: #0f172a;
}

.hero-stage {
    position: relative;
    height: min(680px, calc(100vh - 64px));
    min-height: 520px;
    overflow: hidden;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.46) 45%, rgba(0, 0, 0, 0.12) 100%),
        radial-gradient(circle at 12% 24%, rgba(20, 184, 166, 0.5), transparent 36%),
        radial-gradient(circle at 72% 18%, rgba(37, 99, 235, 0.45), transparent 42%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 92px;
    width: min(720px, calc(100% - 64px));
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

.hero p {
    max-width: 660px;
    margin: 0 0 22px;
    font-size: 18px;
    color: #e5e7eb;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    white-space: nowrap;
}

.hero-tags span {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 13px;
}

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

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

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

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(8px);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.62);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

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

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

.section-head p,
.page-hero p {
    margin: 0 0 6px;
    color: #0d9488;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-head h2,
.page-hero h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-head a {
    color: #0d9488;
    font-weight: 800;
}

.center-head {
    display: block;
    text-align: center;
}

.slim-head {
    display: block;
}

.home-search {
    padding-top: 44px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin: 0 0 28px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    color: #111827;
    background: #ffffff;
    outline: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 62%);
}

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.score-badge {
    right: 12px;
    bottom: 12px;
    min-width: 48px;
    height: 30px;
    background: rgba(20, 184, 166, 0.95);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 42px;
    height: 32px;
    background: rgba(245, 158, 11, 0.95);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 9px;
    color: #111827;
    font-size: 20px;
    line-height: 1.28;
}

.movie-card h3 a:hover {
    color: #0d9488;
}

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

.tag-row span,
.detail-tags span {
    padding: 5px 9px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
}

.movie-card-compact .movie-card-body {
    padding: 15px;
}

.movie-card-compact h3 {
    font-size: 18px;
}

.feature-band {
    width: min(1220px, calc(100% - 32px));
    padding: 48px 30px;
    border-radius: 32px;
    background: linear-gradient(90deg, #f0fdfa 0%, #ecfeff 100%);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 26px;
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.category-card-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.18)),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.48), transparent 45%);
}

.category-card div {
    position: absolute;
    inset: auto 18px 18px;
}

.category-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #e5e7eb;
    font-size: 14px;
}

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

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

.rank-panel,
.side-card,
.content-card,
.player-card {
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 24px;
}

.rank-lines {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.rank-line {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
    background: #f0fdfa;
    transform: translateX(4px);
}

.rank-line span {
    color: #0d9488;
    font-weight: 900;
}

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

.rank-line em {
    color: #f59e0b;
    font-style: normal;
    font-weight: 900;
}

.full-btn {
    width: 100%;
}

.page-hero {
    position: relative;
    min-height: 300px;
    display: grid;
    place-items: center;
    padding: 70px 20px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.34), transparent 34%),
        radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.34), transparent 32%),
        linear-gradient(135deg, #f0fdfa 0%, #eff6ff 100%);
}

.page-hero span {
    display: block;
    max-width: 760px;
    margin: 16px auto 0;
    color: #475569;
    font-size: 18px;
}

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

.detail-hero > img {
    width: 100%;
    height: 470px;
    object-fit: cover;
    opacity: 0.76;
    filter: saturate(1.08);
}

.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.34)),
        radial-gradient(circle at 12% 24%, rgba(20, 184, 166, 0.46), transparent 40%);
}

.detail-hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    right: 24px;
    bottom: 56px;
    max-width: 860px;
    color: #ffffff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #5eead4;
}

.detail-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
}

.detail-hero p {
    max-width: 740px;
    margin: 0 0 18px;
    color: #e5e7eb;
    font-size: 18px;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

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

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

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

.player-card video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(20, 184, 166, 0.35), transparent 28%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.28));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 5px;
    background: linear-gradient(90deg, #0d9488, #2563eb);
    box-shadow: 0 22px 46px rgba(37, 99, 235, 0.34);
    font-size: 30px;
}

.player-cover strong {
    font-size: 20px;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.content-card {
    padding: 28px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 26px;
}

.content-card h2:not(:first-child) {
    margin-top: 30px;
}

.content-card p {
    margin: 0;
    color: #475569;
    font-size: 17px;
}

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

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

.side-card {
    padding: 24px;
}

.side-card dl {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.side-card dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.side-card dd {
    margin: -8px 0 0;
    color: #111827;
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 22px;
    color: #64748b;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 30px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 800;
}

.footer-links a:hover {
    color: #5eead4;
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 70;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #0d9488, #2563eb);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.back-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.back-top:hover {
    transform: translateY(-3px);
}

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

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-stage {
        min-height: 540px;
    }

    .hero-content {
        left: 20px;
        bottom: 82px;
        width: calc(100% - 40px);
    }

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

    .hero-arrow {
        display: none;
    }

    .section-shell,
    .feature-band {
        width: min(100% - 24px, 1180px);
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .feature-band {
        padding-left: 16px;
        padding-right: 16px;
        border-radius: 24px;
    }

    .section-head {
        display: block;
    }

    .section-head a {
        display: inline-block;
        margin-top: 8px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        min-height: 240px;
        padding: 48px 18px;
    }

    .detail-hero,
    .detail-hero > img {
        min-height: 460px;
        height: 460px;
    }

    .detail-hero-content {
        left: 18px;
        right: 18px;
        bottom: 36px;
    }

    .content-card,
    .side-card {
        padding: 22px;
    }

    .footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 18px;
        flex-wrap: wrap;
    }
}
