/* 豆瓣电影卡片（帖子正文渲染） */
.xn-db-card{display:flex;gap:14px;margin:12px 0;padding:12px;border:1px solid var(--color-border,#e8eaed);border-radius:10px;background:var(--color-card,#fff);max-width:640px;align-items:flex-start;}
.xn-db-poster{flex:0 0 96px;width:96px;}
.xn-db-poster img,.xn-db-ph{width:96px;height:134px;object-fit:cover;border-radius:6px;display:block;background:#f3f4f6;}
.xn-db-ph{display:flex;align-items:center;justify-content:center;color:#9aa0a6;font-size:12px;}
.xn-db-body{flex:1;min-width:0;}
.xn-db-head{font-size:16px;font-weight:700;line-height:1.4;}
.xn-db-head a{color:inherit;text-decoration:none;}
.xn-db-year{margin-left:6px;color:#8a919f;font-weight:500;font-size:13px;}
.xn-db-rating{margin:6px 0 4px;display:flex;align-items:baseline;gap:8px;}
.xn-db-score{color:#f5a623;font-size:22px;font-weight:800;line-height:1;}
.xn-db-votes,.xn-db-noscore,.xn-db-meta{color:#8a919f;font-size:12px;}
.xn-db-row{font-size:13px;line-height:1.6;color:#4b5563;}
.xn-db-row em{font-style:normal;color:#8a919f;margin-right:8px;}
.xn-db-intro{margin-top:6px;font-size:13px;color:#6b7280;line-height:1.6;}
.xn-db-link{display:inline-block;margin-top:0;font-size:12px;color:#41b883;}

/* 卡片操作区：立即播放 + 豆瓣条目 */
.xn-db-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:10px;}
.xn-db-play{display:inline-flex !important;align-items:center;justify-content:center;gap:7px;height:34px;margin-right:14px;padding:0 16px;border:0 !important;border-radius:17px;background:#e8f8ee !important;color:#2f9e60 !important;font:600 13px/1 inherit;cursor:pointer;transition:background .15s ease,color .15s ease;}
.xn-db-actions .xn-db-play{margin-right:0;}
.xn-db-play:hover{background:#d7f3e2 !important;color:#237a49 !important;}
.xn-db-play-ico{display:inline-block;width:0;height:0;border-left:9px solid currentColor;border-top:6px solid transparent;border-bottom:6px solid transparent;}

/* 播放器弹窗 */
.kdb-player-mask{position:fixed;inset:0;z-index:2100;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.78);}
.kdb-player-mask[hidden]{display:none;}
.kdb-player{width:100%;max-width:900px;background:#000;border-radius:10px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5);}
.kdb-player-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:#111;color:#fff;font-size:13px;}
.kdb-player-title{flex:1 1 auto;min-width:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.kdb-player-sel{flex:0 0 auto;display:flex;align-items:center;gap:6px;}
.kdb-player-sel[hidden]{display:none;}
.kdb-player-sel select{height:28px;max-width:150px;padding:0 6px;border:1px solid #333;border-radius:6px;background:#1b1b1b;color:#ddd;font-size:12px;line-height:1;}
.kdb-player-x{flex:0 0 auto;border:0;background:transparent;color:#bbb;font-size:20px;line-height:1;cursor:pointer;padding:0 4px;}
.kdb-player-x:hover{color:#fff;}
.kdb-player-stage{position:relative;background:#000;min-height:220px;}
.kdb-player video{display:block;width:100%;max-height:72vh;background:#000;}
.kdb-play-big{position:absolute;left:50%;top:50%;width:66px;height:66px;margin:-33px 0 0 -33px;display:flex;align-items:center;justify-content:center;border:0;border-radius:50%;background:rgba(0,0,0,.55);cursor:pointer;transition:background .15s ease;}
.kdb-play-big[hidden]{display:none;}
.kdb-play-big:hover{background:rgba(0,0,0,.75);}
.kdb-play-big span{display:block;width:0;height:0;margin-left:4px;border-left:20px solid #fff;border-top:12px solid transparent;border-bottom:12px solid transparent;}
.kdb-retry{display:inline-block;margin-top:8px;padding:6px 14px;border:1px solid #444;border-radius:6px;background:#222;color:#ddd;font-size:13px;cursor:pointer;}
.kdb-player-tip{padding:22px 16px;color:#ccc;font-size:13px;text-align:center;line-height:1.8;}
.kdb-player-tip a{color:#7ecb9b;}

/* ===== 插入豆瓣电影弹窗（类名 kdb-*，避免与旧版样式冲突） ===== */
.kdb-mask{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.35);}
.kdb-mask[hidden]{display:none;}
.kdb-dialog{width:100%;max-width:460px;background:#fff;border-radius:12px;box-shadow:0 18px 50px rgba(0,0,0,.2);overflow:hidden;font-family:inherit;text-align:left;}
.kdb-head{padding:20px 20px 4px;}
.kdb-title{margin:0;font-size:16px;font-weight:600;line-height:1.5;color:#1f2329;}
.kdb-body{padding:4px 20px 0;}
.kdb-label{display:block;margin:6px 0 8px;font-size:13px;line-height:1.5;color:#666c75;font-weight:400;}
.kdb-input{display:block;box-sizing:border-box;width:100%;height:40px;padding:0 12px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#1f2329;font-size:14px;line-height:1;outline:none;transition:border-color .15s ease,box-shadow .15s ease;font-family:inherit;}
.kdb-input::placeholder{color:#a9afb8;}
.kdb-input:focus{border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,.16);}
.kdb-list{margin-top:8px;max-height:300px;overflow:auto;}
.kdb-foot{display:flex;justify-content:flex-end;padding:12px 20px 18px;}
.kdb-close{height:36px;padding:0 18px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#333a44;font-size:14px;font-family:inherit;cursor:pointer;transition:border-color .15s ease,color .15s ease;}
.kdb-close:hover{border-color:#c9cdd4;color:#111;}
.kdb-item{display:flex;gap:10px;padding:8px;border-radius:8px;cursor:pointer;align-items:center;}
.kdb-item:hover{background:#f6f7f9;}
.kdb-item img{width:42px;height:58px;flex:0 0 42px;object-fit:cover;border-radius:4px;background:#eee;}
.kdb-item .kdb-ph{width:42px;height:58px;flex:0 0 42px;border-radius:4px;background:#f0f1f3;display:flex;align-items:center;justify-content:center;color:#b3b8c2;font-size:12px;}
.kdb-item-body{min-width:0;flex:1;}
.kdb-item-title{font-size:14px;font-weight:600;color:#1f2329;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.kdb-item-sub{font-size:12px;color:#8a919f;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.kdb-empty,.kdb-loading{padding:20px 8px;text-align:center;color:#8a919f;font-size:13px;}
.kdb-empty.is-error{color:#d14343;}

/* 旧版自动生成的「插入电影」胶囊按钮：隐藏，统一走编辑器工具栏「豆」 */
#xn_db_btn{display:none !important;}

/* 编辑器内 chip */
.kehua-db-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:30px;margin:0 2px;padding:0 10px;border:1px solid #e5e7eb;border-radius:999px;background:#f5f6f8;color:#666c75;font-size:13px;line-height:1;vertical-align:middle;user-select:none;}
.kehua-db-chip img{width:18px;height:24px;object-fit:cover;border-radius:3px;flex:0 0 18px;}
.kehua-db-chip-text{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

@media (max-width:640px){
	.xn-db-card{gap:10px;padding:10px;}
	.xn-db-poster,.xn-db-poster img,.xn-db-ph{width:78px;flex-basis:78px;height:110px;}
	.xn-db-score{font-size:18px;}
	.kdb-dialog{max-width:100%;}
	.kdb-head{padding:16px 16px 4px;}
	.kdb-body{padding:4px 16px 0;}
	.kdb-foot{padding:10px 16px 14px;}
}
