:root {
    --bg-color: #141414;
    --panel-bg: #1f1f1f;
    --accent: #e50914;
    --text-main: #ffffff;
    --text-sub: #b3b3b3;
    --border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding-bottom: 60px;
    overflow-x: hidden;
}

/* 屏蔽 DPlayer 提示 */
.dplayer-notice,
.dplayer-notice-list {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 全局滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #141414;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 导航 */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    transition: 0.3s;
}

.navbar-custom.scrolled {
    background: #141414;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.brand {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Hero */
.carousel-item {
    height: 70vh;
    background-color: #000;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    transition: transform 10s ease;
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.carousel-item.active .hero-bg {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #141414 0%, transparent 60%), linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    display: flex;
    align-items: center;
    padding-left: 5%;
}

.hero-content {
    max-width: 600px;
    margin-top: 60px;
    animation: fadeInUp 0.8s;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-desc {
    font-size: 1.1rem;
    color: #ddd;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-play {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-play:hover {
    transform: scale(1.05);
}

.btn-info {
    background: rgba(109, 109, 110, 0.7);
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.2s;
    backdrop-filter: blur(5px);
    margin-top: 15px;
}

.btn-info:hover {
    background: rgba(109, 109, 110, 0.5);
}

@media(max-width: 768px) {
    .carousel-item {
        height: 55vh;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .btn-play,
    .btn-info {
        padding: 8px 20px;
        font-size: 1rem;
    }
}

/* 搜索框 */
.search-section {
    position: relative;
    margin-top: -35px;
    z-index: 20;
    padding: 0 5%;
    margin-bottom: 40px;
}

.search-box-wrapper {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-box-wrapper:focus-within {
    border-color: var(--accent);
    background: #000;
}

.search-icon {
    padding: 0 20px;
    color: #888;
    font-size: 18px;
    cursor: pointer;
}

.search-input {
    width: 100%;
    height: 60px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    outline: none;
}

/* 列表通用 */
.section-container {
    padding: 0 5%;
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.section-line {
    width: 4px;
    height: 22px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 12px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* 热榜导航按钮 */
.hot-row-nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.nav-btn i {
    font-size: 12px;
}

/* 移动端隐藏导航按钮 */
@media (max-width: 768px) {
    .hot-row-nav {
        display: none;
    }
    
    .hot-row {
        padding: 0 15px 20px;
        margin: 0 -15px;
    }
    
    .hot-card {
        min-width: 120px;
        width: 120px;
    }
}

.hot-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    padding: 0 20px 20px;
    margin: 0 -20px;
}

.hot-row::-webkit-scrollbar {
    height: 0px;
}

.hot-row:active {
    cursor: grabbing;
    scroll-snap-type: none;
}

.hot-row.grabbing {
    cursor: grabbing;
    scroll-snap-type: none;
}

.hot-card {
    min-width: 150px;
    width: 150px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.hot-card {
    min-width: 150px;
    width: 150px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.hot-card:hover {
    transform: scale(1.08);
    z-index: 10;
}

.poster-wrap {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s;
}

.rank-badge {
    position: absolute;
    top: -12px;
    left: -8px;
    font-size: 64px;
    font-weight: 900;
    color: #141414;
    -webkit-text-stroke: 2px #666;
    font-family: impact, sans-serif;
    text-shadow: 2px 2px 0px #eee;
    z-index: 10;
    pointer-events: none;
    line-height: 1;
}

.rating-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: #46d369;
    font-weight: bold;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(70, 211, 105, 0.3);
}

.poster-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #333 0%, #111 100%);
    padding: 5px;
    text-align: center;
}

.fallback-text {
    font-size: 12px;
    color: #999;
}

.movie-name {
    margin-top: 10px;
    font-size: 14px;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    font-weight: 500;
}

.movie-date {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 2px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    min-height: 300px;
}

.result-card {
    cursor: pointer;
    transition: 0.2s;
}

.result-card:hover {
    transform: translateY(-5px);
}

/* ★★★ 播放页重构：影院模式 ★★★ */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #141414;
    z-index: 9999;
    display: none;
    overflow-y: auto;
}

.detail-overlay.active {
    display: block;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.close-btn {
    position: fixed;
    top: 25px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 10005;
    backdrop-filter: blur(10px);
    transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* 布局容器 */
.player-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 4% 50px;
}

/* 视频区域 */
.player-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    border: 1px solid #333;
}

.player-box movi-player,
.player-box > video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}


/* 视频信息栏 */
.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.video-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.2;
}

.video-meta {
    color: #888;
    font-size: 14px;
}

/* 投屏按钮 */
.btn-cast {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.btn-cast:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 控制区域 (下半部分) */
.controls-area {
    background: #1f1f1f;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 线路选择 (横向滚动) */
.panel-title {
    font-size: 14px;
    color: #888;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.source-pill {
    padding: 8px 16px;
    border-radius: 6px;
    background: #2a2a2a;
    border: 1px solid #333;
    color: #ccc;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.source-pill:hover {
    background: #333;
    border-color: #666;
    color: #fff;
}

.source-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

/* 选集 (大网格) */
.ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    /* 自适应宽度，最小100px */
    gap: 12px;
}

.ep-btn {
    background: #2a2a2a;
    border: 1px solid transparent;
    color: #ddd;
    padding: 12px 5px;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-btn:hover {
    background: #333;
    color: #fff;
    border-color: #555;
}

.ep-btn.active {
    background: #fff;
    color: #000;
    font-weight: bold;
    border-color: #fff;
}

/* 状态灯 */
.latency-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot-green {
    background: #46d369;
    box-shadow: 0 0 5px #46d369;
}

.dot-yellow {
    background: #ffcc00;
}

.dot-red {
    background: #ff453a;
}

.footer {
    text-align: center;
    font-size: 12px;
    color: #444;
    margin-top: 80px;
    padding-bottom: 20px;
}

/* === Harmonia Library adaptations (Alist /115) === */
.hero-static {
    position: relative;
    height: 55vh;
    min-height: 320px;
    background: #000;
    overflow: hidden;
}

.hero-bg-gradient {
    background:
        radial-gradient(ellipse at 70% 20%, rgba(229, 9, 20, 0.35), transparent 55%),
        linear-gradient(135deg, #1a0505 0%, #141414 50%, #0a0a12 100%);
    transform: none !important;
}

.hero-spacer {
    height: 72px;
}

.search-section-flat {
    margin-top: 10px;
}

.search-clear {
    background: transparent;
    border: none;
    color: #888;
    padding: 0 18px;
    cursor: pointer;
    font-size: 16px;
}

.search-clear:hover {
    color: #fff;
}

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

.btn-nav-home {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ddd;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}

.btn-nav-home:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.crumb-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.crumb-btn:hover {
    color: #fff;
}

.crumb-sep {
    color: #555;
}

.crumb-current {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.folder-poster .folder-fallback {
    background: linear-gradient(160deg, #2a1518 0%, #181818 100%);
}

.folder-poster .folder-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
}

.folder-poster .rating-badge,
.folder-poster .rank-badge {
    z-index: 2;
}


.folder-fallback .fallback-text {
    font-size: 12px;
    color: #ccc;
    padding: 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.error-panel {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #1f1f1f;
    border: 1px solid rgba(229, 9, 20, 0.35);
    border-radius: 12px;
    padding: 24px;
    color: #eee;
}

.error-panel > i {
    color: var(--accent);
    font-size: 22px;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-infuse {
    background: rgba(229, 9, 20, 0.2);
    border-color: rgba(229, 9, 20, 0.5);
}

.btn-infuse:hover {
    background: rgba(229, 9, 20, 0.4);
}

@media (max-width: 768px) {
    .hero-static {
        height: 42vh;
        min-height: 260px;
    }

    .video-title {
        font-size: 1.4rem;
    }
}


/* === Layout fix 2026-10-19: header/content collision, rank badge, no duplicate titles === */
.navbar-custom {
    background: rgba(20, 20, 20, 0.92) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 4%;
    min-height: 56px;
    box-sizing: border-box;
}

.navbar-custom.scrolled {
    background: #141414 !important;
}

.brand {
    font-size: 20px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.hero-static.carousel-item,
.hero-static {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 280px;
    max-height: none;
    padding-top: 72px; /* clear fixed navbar */
    padding-bottom: 48px;
    margin: 0;
    float: none !important;
    z-index: 1;
    overflow: hidden;
}

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

.hero-static .hero-content {
    position: relative;
    z-index: 2;
    margin-top: 12px;
    max-width: 640px;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem) !important;
}

.hero-spacer {
    height: 64px;
}

/* Do NOT pull search up into hero / header */
.search-section {
    position: relative;
    margin-top: 8px !important;
    margin-bottom: 28px;
    z-index: 2;
    padding: 0 5%;
}

.search-section-flat {
    margin-top: 8px !important;
}

#library,
#folder-view {
    position: relative;
    z-index: 2;
    clear: both;
}

.section-container {
    position: relative;
    z-index: 2;
}

.section-header {
    position: relative;
    z-index: 3;
    background: transparent;
    margin-top: 8px;
    margin-bottom: 16px;
}

.hot-row {
    position: relative;
    z-index: 1;
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 8px;
}

.hot-card {
    overflow: visible;
}

.poster-wrap {
    overflow: hidden; /* clip badges inside card */
    z-index: 1;
}

/* Smaller in-card rank, no giant overlapping numbers */
.rank-badge {
    top: auto !important;
    bottom: 6px !important;
    left: 8px !important;
    font-size: 22px !important;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.85) !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    font-family: inherit !important;
    z-index: 2;
    line-height: 1;
}

.movie-name {
    margin-top: 8px;
    font-size: 13px;
    color: #ddd;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 2.6em;
}

.folder-fallback {
    gap: 0;
}

@media (max-width: 768px) {
    .hero-static.carousel-item,
    .hero-static {
        min-height: 240px;
        padding-top: 64px;
        padding-bottom: 36px;
    }
    .brand {
        font-size: 16px;
    }
    .hot-card {
        min-width: 120px;
        width: 120px;
    }
}

/* Cover images (javdb cached) */
.poster-wrap .folder-cover,
.poster-wrap .video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
.poster-wrap img.folder-cover,
.poster-wrap img.video-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.poster-wrap .poster-fallback {
    position: relative;
    z-index: 0;
}

/* --- 2026-10-19: covers full-visible (no crop) ---
   javdb 番号图多为横版约 3:2；人名头像多为方图。
   用 contain 完整露出，黑边可接受。 */
.poster-wrap {
    aspect-ratio: 3 / 2;
    background: #111;
}
.poster-wrap.folder-poster {
    aspect-ratio: 1 / 1;
    background: #151515;
}
.poster-wrap img,
.poster-wrap .folder-cover,
.poster-wrap .video-cover,
.folder-poster .folder-cover {
    object-fit: contain !important;
    object-position: center center !important;
    background: #111;
}

/* === 2026-10-21 homenav：全站顶栏（日剧 / AV / IP）+ AV/IP 统一成日剧栏的深色 Netflix 风 ===
   配色只用一套：底 #141414 / 面板 #1f1f1f / 线 rgba(255,255,255,.1) / 灰字 #b3b3b3 / 唯一强调色 var(--accent) #e50914 */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1500; display: flex; align-items: center; gap: 28px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 4% 14px; background: linear-gradient(to bottom, rgba(0,0,0,.85), transparent); transition: background .3s, box-shadow .3s; }
.site-nav.scrolled { background: #141414; box-shadow: 0 4px 20px rgba(0,0,0,.6); }
body:not([data-sec="jdrama"]) .site-nav { background: #141414; }
.site-brand { font-size: 24px; font-weight: 800; color: var(--accent); text-decoration: none; letter-spacing: 1px; white-space: nowrap; }
.site-brand:hover { color: var(--accent); }
.site-tabs { display: flex; gap: 22px; }
.site-tabs a { position: relative; color: #ccc; text-decoration: none; font-size: 15px; white-space: nowrap; padding: 4px 0; transition: color .15s; }
.site-tabs a:hover { color: #fff; }
.site-tabs a.on { color: #fff; font-weight: 700; }
.site-tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 1px; background: var(--accent); }
.site-nav-extra { margin-left: auto; display: flex; align-items: center; }
.site-subs { display: inline-flex; align-items: center; gap: 6px; color: #ccc; text-decoration: none; font-size: 14px; white-space: nowrap; }
.site-subs:hover, .site-subs.on { color: #fff; }
.site-subs i { font-size: 13px; }
.site-subs .jd-count { margin-left: 0; }

/* 旧顶栏已不再使用 */
.navbar-custom { display: none !important; }

/* 栏目大图（AV / IP 首页） */
.sec-hero { position: relative; height: min(56vh, 520px); min-height: 340px; overflow: hidden; background: #000; }
.sec-hero-img { position: absolute; inset: 0; }
.sec-hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: blur(2px) brightness(.75); transform: scale(1.04); user-select: none; }
.sec-hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, #141414 0%, rgba(20,20,20,0) 50%), linear-gradient(to right, rgba(0,0,0,.88) 0%, rgba(0,0,0,.4) 45%, transparent 75%), radial-gradient(ellipse at 80% 20%, rgba(229,9,20,.18), transparent 60%); }
.sec-hero-body { position: absolute; left: 5%; bottom: 14%; max-width: 620px; padding-right: 5%; z-index: 2; }
.sec-hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 900; line-height: 1.05; margin: 0 0 10px; text-shadow: 2px 2px 10px rgba(0,0,0,.8); }
.sec-hero-desc { font-size: 1.05rem; color: #eee; margin: 0 0 6px; text-shadow: 1px 1px 3px rgba(0,0,0,.9); }
.sec-hero-sub { font-size: .92rem; color: var(--text-sub); margin-bottom: 20px; }
.sec-spacer { height: 70px; }
#app .jd-kicker { display: inline-block; font-size: 12px; color: #ddd; letter-spacing: 1px; margin-bottom: 12px; padding: 3px 10px; border-radius: 3px; background: rgba(255,255,255,.14); }
#app .jd-btns { display: flex; gap: 12px; flex-wrap: wrap; }
#app .jd-btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 4px; padding: 10px 22px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; }
#app .jd-btn-play { background: #fff; color: #000; }
#app .jd-btn:hover { filter: brightness(1.12); }

/* 搜索框 */
.search-section { margin-top: 18px !important; margin-bottom: 18px; padding: 0 4%; }
.search-box-wrapper { max-width: 560px; margin: 0; background: #1f1f1f !important; border: 1px solid rgba(255,255,255,.1) !important; border-radius: 4px !important; }
.search-box-wrapper:focus-within { border-color: #777 !important; box-shadow: none !important; }
.search-input { background: transparent !important; color: #fff !important; }

/* 面包屑 */
.breadcrumb-bar { padding: 0 4% !important; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.crumb-btn { background: #2a2a2a !important; color: #ddd !important; border: 1px solid #3a3a3a !important; border-radius: 4px !important; padding: 5px 12px !important; font-size: 13px; }
.crumb-btn:hover { background: #3a3a3a !important; color: #fff !important; }
.crumb-current { color: #fff; font-weight: 700; padding: 0 6px; }
.crumb-sep { color: #666; }

/* 栏目标题：与日剧栏 .jd-row-head 一致，去掉红色竖线 */
#folder-view { padding: 0 4% !important; max-width: none !important; }
#folder-view .section-line { display: none; }
#folder-view .section-header { display: flex; align-items: baseline; margin: 10px 0 12px; }
#folder-view .section-title { font-size: 1.3rem; font-weight: 700; color: #fff; }
#folder-view .section-header .text-muted { color: var(--text-sub) !important; }

/* 卡片：与日剧栏卡片同款圆角、细边、悬停放大 */
#folder-view .result-grid { gap: 12px; }
#folder-view .result-card { background: transparent; border: none; }
#folder-view .poster-wrap { border-radius: 5px; border: 1px solid rgba(255,255,255,.1); background: #1a1a1a; transition: transform .25s, box-shadow .25s; }
#folder-view .result-card:hover { transform: none; }
#folder-view .result-card:hover .poster-wrap { transform: scale(1.04); box-shadow: 0 8px 22px rgba(0,0,0,.6); }
#folder-view .movie-name { color: #eee; font-weight: 600; font-size: 13.5px; }
.rating-badge { color: #ddd !important; background: rgba(0,0,0,.65) !important; border: 1px solid rgba(255,255,255,.15) !important; }
.footer { color: #666; }

/* 播放层：沿用深色，Infuse 按钮用灰底，强调色只留给图标 */
.btn-infuse { background: #2a2a2a !important; border-color: #444 !important; }
.btn-infuse i { color: var(--accent); }

@media (max-width: 768px) {
  .site-nav { gap: 14px; padding: calc(12px + env(safe-area-inset-top, 0px)) 4% 12px; }
  .site-brand { font-size: 17px; }
  .site-tabs { gap: 16px; }
  .site-tabs a { font-size: 14px; }
  .site-subs-text { display: none; }
  .sec-hero { height: 46vh; min-height: 300px; }
  .sec-hero-body { bottom: 10%; }
  .sec-spacer { height: 60px; }
  #app .jd-btn { padding: 9px 16px; font-size: 15px; }
}
/* homenav 细调 */
#folder-view .poster-fallback { background: #1f1f1f !important; color: #555 !important; }
#folder-view .section-header.is-root { display: none; }
@media (max-width: 768px) {
  #folder-view .result-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; min-height: 0; }
  #folder-view .movie-name { font-size: 12px; }
}

/* ==== 2026-10-24 jdrama summer UI：手机顶栏/KV 给 iPhone 安全区留空 ==== */
.site-nav {
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-bottom: 14px;
}
@media (max-width: 768px) {
  .site-nav {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: 12px;
  }
  /* 日剧大图区内容不要顶到刘海/状态栏 */
  body.jd-on .jd-hero-count {
    top: calc(100vw / 1.6 - 34px + env(safe-area-inset-top, 0px) * 0);
  }
}


/* ==== 2026-10-24 heronav：手机顶栏实底 + 压过 KV ==== */
@media (max-width: 768px) {
  body.jd-on .site-nav,
  body.jd-on .site-nav.scrolled {
    background: #141414 !important;
    box-shadow: 0 2px 14px rgba(0,0,0,.55);
  }
  .site-nav { z-index: 3000; }
}
