:root {
    --bg: #f0f9ff;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0284c7;
    --brand-2: #2563eb;
    --brand-soft: #e0f2fe;
    --shadow: 0 24px 70px rgba(2, 8, 23, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 21px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 15px;
    color: #334155;
}

.nav-link {
    position: relative;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--brand);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 22px;
}

.mobile-menu {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.mobile-menu.open {
    display: grid;
    gap: 12px;
}

.mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mobile-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    height: min(720px, 74vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.9s ease, transform 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide::after,
.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.24), transparent 34%), linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 54%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(820px, calc(100% - 42px));
    margin-left: max(24px, calc((100vw - 1240px) / 2));
    color: #fff;
}

.eyebrow {
    margin: 0 0 12px;
    color: #0284c7;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.detail-copy .eyebrow {
    color: #bae6fd;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #075985;
    background: #e0f2fe;
}

.hero-content .hero-tags span,
.detail-copy .hero-tags span {
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.26);
    border: 1px solid rgba(186, 230, 253, 0.32);
}

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

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

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

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.btn.ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.btn.ghost.dark {
    color: #075985;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
}

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

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

.hero-dot.active {
    background: #38bdf8;
}

.section-wrap,
.search-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 56px auto;
}

.intro-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 30px;
    align-items: start;
}

.intro-copy,
.search-panel,
.category-overview-card,
.content-card,
.info-card,
.player-card {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.intro-copy {
    padding: 32px;
}

.intro-copy h2,
.section-title h2,
.category-overview-head h2,
.content-card h2,
.info-card h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 40px);
    letter-spacing: -0.04em;
}

.intro-copy p,
.category-overview-head p,
.content-card p,
.info-card dd,
.movie-card p,
.rank-info p {
    color: var(--muted);
    line-height: 1.75;
}

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

.category-pill {
    min-height: 96px;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #e0f2fe);
    border: 1px solid #bae6fd;
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-pill:hover,
.movie-card:hover,
.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-pill span {
    display: block;
    margin-bottom: 6px;
    font-weight: 850;
    color: #075985;
}

.category-pill small {
    color: #64748b;
    line-height: 1.5;
}

.section-title,
.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.text-link {
    color: var(--brand);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.poster-link img,
.rank-cover img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.7);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #0f172a;
    font-weight: 850;
    font-size: 17px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    color: #64748b;
    font-size: 13px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
}

.search-panel {
    padding: 24px;
}

.search-label {
    display: block;
    margin-bottom: 12px;
    color: #075985;
    font-weight: 850;
}

.search-box {
    display: flex;
    gap: 12px;
}

.movie-search {
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border: 1px solid #bae6fd;
    border-radius: 18px;
    outline: none;
    color: #0f172a;
    background: #f8fafc;
    font-size: 16px;
}

.movie-search:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.search-clear {
    min-width: 86px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    font-weight: 850;
    cursor: pointer;
}

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

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 92px 52px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #e0f2fe;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #075985;
    background: #e0f2fe;
    font-size: 18px;
    font-weight: 900;
}

.rank-item.top .rank-number {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-info a {
    font-weight: 900;
    font-size: 18px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 72px;
    color: #fff;
    background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.45), transparent 35%), linear-gradient(135deg, #020617, #075985 58%, #2563eb);
}

.page-hero-content {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.category-overview {
    display: grid;
    gap: 28px;
}

.category-overview-card {
    padding: 26px;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
    padding: 70px 0 48px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: 0 32px 86px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    color: #bae6fd;
    font-weight: 750;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

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

.player-card video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.56));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.42);
    font-size: 32px;
    cursor: pointer;
}

.content-card,
.info-card {
    padding: 26px;
}

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

.info-card dt {
    color: #0f172a;
    font-weight: 850;
}

.info-card dd {
    margin: 0;
}

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

.side-list .movie-card {
    display: grid;
    grid-template-columns: 92px 1fr;
}

.side-list .poster-link {
    height: 100%;
}

.side-list .card-body {
    padding: 12px;
}

.side-list .card-title {
    min-height: auto;
    font-size: 15px;
}

.side-list .tag-row,
.side-list .card-meta,
.side-list p {
    display: none;
}

.site-footer {
    margin-top: 70px;
    padding: 46px 0;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 30px;
}

.footer-inner p {
    max-width: 480px;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-weight: 700;
}

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

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

    .short-list {
        grid-template-columns: 1fr;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
        height: 68vh;
    }

    .intro-grid,
    .detail-layout,
    .detail-inner,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(280px, 70vw);
    }

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

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

@media (max-width: 640px) {
    .header-inner,
    .section-wrap,
    .search-panel,
    .footer-inner,
    .page-hero-content,
    .detail-inner {
        width: min(100% - 22px, 1240px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-content {
        width: min(100% - 24px, 820px);
        margin-left: 12px;
    }

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

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

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

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 72px 38px 1fr;
        gap: 10px;
    }

    .rank-number {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 15px;
    }

    .rank-info a {
        font-size: 15px;
    }

    .rank-info p {
        display: none;
    }

    .search-box,
    .section-title,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .search-clear {
        height: 46px;
    }

    .detail-hero,
    .detail-inner {
        min-height: auto;
    }

    .detail-inner {
        padding-top: 42px;
    }

    .content-card,
    .info-card,
    .category-overview-card,
    .intro-copy,
    .search-panel {
        padding: 18px;
        border-radius: 20px;
    }
}
