:root {
    --page-bg: #f0f9ff;
    --card-bg: #ffffff;
    --ink: #172033;
    --muted: #607088;
    --line: rgba(14, 116, 144, 0.16);
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --accent: #38bdf8;
    --soft: #e0f2fe;
    --shadow: 0 18px 45px rgba(2, 132, 199, 0.14);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.09);
    --radius: 24px;
    --max: 1180px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.22), transparent 28rem),
        linear-gradient(180deg, #f8fcff 0%, #eef8ff 48%, #ffffff 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
}

.brand:hover {
    color: var(--primary-dark);
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.12rem;
    font-weight: 900;
}

.brand-text span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #334155;
    font-weight: 700;
    font-size: 0.95rem;
}

.nav-links a {
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transition: right 0.22s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--primary-dark);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
    right: 0;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    color: var(--primary-dark);
    background: #ffffff;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

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

.mobile-panel-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    display: grid;
    gap: 8px;
}

.mobile-panel-inner a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
    font-weight: 700;
}

.mobile-panel-inner a:hover {
    color: var(--primary-dark);
    background: var(--soft);
}

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

.hero-slider {
    position: relative;
    margin: 28px auto 44px;
    min-height: 560px;
    overflow: hidden;
    border-radius: 34px;
    color: #ffffff;
    background: #082f49;
    box-shadow: 0 28px 70px rgba(3, 105, 161, 0.24);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: center;
    gap: 36px;
    padding: clamp(28px, 5vw, 64px);
    opacity: 0;
    visibility: hidden;
    transform: translateX(26px);
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: saturate(1.06) contrast(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 47, 73, 0.94) 0%, rgba(8, 47, 73, 0.72) 45%, rgba(8, 47, 73, 0.36) 100%),
        radial-gradient(circle at 28% 18%, rgba(56, 189, 248, 0.38), transparent 28rem);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    font-size: 0.9rem;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 5vw, 4.85rem);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.hero-tags {
    margin-bottom: 28px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-tags .pill {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    box-shadow: 0 14px 28px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 18px 36px rgba(2, 132, 199, 0.34);
}

.btn-light {
    color: #075985;
    background: #ffffff;
}

.btn-ghost {
    color: #0369a1;
    border-color: var(--line);
    background: #ffffff;
}

.hero-card {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
}

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

.hero-card-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(8, 47, 73, 0.72);
    backdrop-filter: blur(12px);
}

.hero-card-caption strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.12rem;
}

.hero-card-caption span {
    color: #bae6fd;
    font-size: 0.88rem;
}

.hero-controls {
    position: absolute;
    z-index: 3;
    left: clamp(28px, 5vw, 64px);
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

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

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

.hero-arrow {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    color: #075985;
    background: rgba(255, 255, 255, 0.92);
    font-size: 1.15rem;
    cursor: pointer;
}

.quick-search {
    margin: -18px auto 42px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.input,
.select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: #ffffff;
    color: var(--ink);
    font-weight: 700;
}

.input:focus,
.select:focus {
    border-color: rgba(2, 132, 199, 0.48);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.section {
    margin: 0 0 52px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 28px;
    margin-right: 12px;
    border-radius: 99px;
    background: var(--primary);
    vertical-align: -4px;
}

.section-desc {
    max-width: 780px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.85;
}

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(2, 132, 199, 0.32);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e0f2fe;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.36s ease;
}

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

.poster-link::after {
    content: "▶";
    position: absolute;
    inset: auto 14px 14px auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.92);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.38);
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-link::after {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.movie-info {
    padding: 14px 14px 16px;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--primary-dark);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

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

.movie-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

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

.category-card {
    padding: 22px;
    min-height: 178px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 85% 12%, rgba(56, 189, 248, 0.26), transparent 8rem),
        #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.92rem;
}

.category-card span {
    margin-top: 18px;
    color: var(--primary-dark);
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.rank-cover {
    overflow: hidden;
    border-radius: 12px;
}

.rank-cover img {
    width: 86px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.rank-info strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.rank-info strong:hover {
    color: var(--primary-dark);
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.88rem;
}

.page-hero {
    margin: 28px 0 36px;
    padding: clamp(26px, 5vw, 46px);
    border-radius: 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at 86% 0%, rgba(125, 211, 252, 0.42), transparent 22rem),
        linear-gradient(135deg, #075985 0%, #0284c7 50%, #38bdf8 100%);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 850px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.04rem;
    line-height: 1.85;
}

.filter-bar {
    margin: 0 0 26px;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px 160px;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.empty-tip {
    display: none;
    padding: 26px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--line);
}

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

.breadcrumb {
    margin: 26px 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.breadcrumb a {
    color: var(--primary-dark);
}

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

.detail-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-card {
    overflow: hidden;
}

.player-section {
    padding: 18px;
    background: #082f49;
}

.video-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000000;
    display: block;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background:
        linear-gradient(180deg, rgba(8, 47, 73, 0.12), rgba(8, 47, 73, 0.82)),
        rgba(0, 0, 0, 0.12);
}

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

.player-overlay-inner {
    text-align: center;
}

.play-symbol {
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #075985;
    background: rgba(255, 255, 255, 0.96);
    font-size: 2rem;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.player-overlay strong {
    display: block;
    font-size: 1.08rem;
}

.player-message {
    position: absolute;
    z-index: 3;
    left: 18px;
    right: 18px;
    bottom: 16px;
    color: #ffffff;
    text-align: center;
    font-weight: 800;
}

.detail-body {
    padding: 26px;
}

.detail-body h1 {
    margin: 0 0 14px;
    font-size: clamp(1.9rem, 4vw, 3.15rem);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-body h2,
.side-card h2 {
    margin: 24px 0 12px;
    font-size: 1.35rem;
    font-weight: 950;
}

.detail-body p {
    color: #405064;
    line-height: 1.92;
    margin: 0 0 14px;
    font-size: 1.02rem;
}

.side-card {
    padding: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: 22px;
    margin-bottom: 18px;
}

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

.side-card h2:first-child {
    margin-top: 0;
}

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

.related-item {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fcff;
}

.related-item img {
    width: 70px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    margin-bottom: 5px;
    line-height: 1.35;
}

.related-item strong:hover {
    color: var(--primary-dark);
}

.related-item span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.site-footer {
    margin-top: 68px;
    padding: 34px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-links a:hover {
    color: var(--primary-dark);
}

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

.fade-in {
    animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

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

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .hero-slider {
        min-height: 720px;
        border-radius: 28px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
        padding-bottom: 80px;
    }

    .hero-card {
        max-width: 320px;
        margin: 0 auto;
    }

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

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

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .nav-wrap,
    .page-main,
    .footer-inner,
    .mobile-panel-inner {
        width: min(100% - 22px, var(--max));
    }

    .brand-text strong {
        font-size: 0.98rem;
    }

    .brand-text span {
        display: none;
    }

    .hero-slider {
        min-height: 690px;
        margin-top: 16px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 0.96rem;
        line-height: 1.75;
    }

    .hero-actions {
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-controls {
        left: 22px;
        right: 22px;
        justify-content: space-between;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 0.94rem;
    }

    .movie-info p {
        display: none;
    }

    .rank-item {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .rank-num {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .rank-cover img {
        width: 64px;
    }

    .detail-body,
    .side-card {
        padding: 16px;
    }

    .player-section {
        padding: 10px;
    }
}
