/* 批DEV200补九十五：视频随机号码娱乐工具样式（旧模板选号器样式整体删除重写）
 * 布局：预览 9:16 容器（video 底层 + 透明 canvas 号码顶层）+ 操作配置面板；窄屏纵向堆叠 */
.public-video-picker { scroll-margin-top: 10px; }
.video-picker-hero { display: grid; place-items: center; min-height: 132px; margin-bottom: 14px; padding: 20px; border-radius: 14px; background: radial-gradient(circle at 12% 20%, #31c7f0 0 7%, transparent 8%), radial-gradient(circle at 85% 24%, #d82ddb 0 8%, transparent 9%), linear-gradient(125deg, #18ace2, #5e29d9 55%, #db22c5); color: #fff; text-align: center; overflow: hidden; }
.video-picker-hero strong { display: block; font-size: clamp(26px, 4.6vw, 44px); font-weight: 950; letter-spacing: 2px; text-shadow: 0 5px 14px #25116b99; }
.video-picker-hero span { font-size: 15px; font-weight: 700; }

.video-tool-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.video-tool-stage-wrap { display: grid; place-items: center; }
.video-tool-stage { position: relative; width: 100%; max-width: 420px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #0b0f1a; box-shadow: 0 10px 26px #10182840; touch-action: pan-y pinch-zoom; }
.video-tool-stage.is-adjusting { touch-action:none; outline:2px solid #e2372e; cursor:move; }
.video-tool-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #070b12; }
.video-tool-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-tool-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; color: #dfe6f2; background: repeating-linear-gradient(45deg, #131a2a 0 18px, #101624 18px 36px); }
.video-tool-empty strong { font-size: 22px; }
.video-tool-empty span { font-size: 14px; color: #9fb0c8; }

.video-tool-panel { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: #f6f7f9; color: #232a33; }
.video-tool-panel label { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 14px; font-weight: 800; white-space: nowrap; }
/* 补九十六：显式深色文字——全站浅色主题会级联近白文字到 select，白字落白底看不清 */
.video-tool-panel select { width: auto; max-width: 100%; height: 42px; padding: 0 10px; border: 1px solid #d4dae3; border-radius: 9px; background: #fff; color: #232a33; font-size: 14px; font-weight: 700; }
.video-tool-panel select option, .video-tool-panel select optgroup { color: #1f2733; background: #fff; font-weight: 700; }
.video-tool-panel output, .video-tool-panel small { color: #4a5462; }
.video-tool-panel .upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.video-tool-panel .upload small { flex: 1 1 180px; }

/* 补九十八：添加玩法行 + 已选标签 */
.video-tool-addplay { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.video-tool-addplay select { width: auto; }
.video-tool-selected { display: flex; flex-wrap: wrap; gap: 8px; }
.video-tool-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px 5px 10px; border: 1px solid #c9d1dc; border-radius: 999px; background: #fff; color: #2a3340; font-size: 13px; font-weight: 800; }
.video-tool-tag.is-empty { border-color: #c9d1dc; color: #77808c; }
.video-tool-tag__swatch { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; background: var(--play-color, #fff); box-shadow: inset 0 0 0 1px #232a3366, 0 0 0 1px #fff; }
.video-tool-tag__label { min-width: 0; }
.video-tool-tag__color { width: 76px !important; min-width: 76px; height: 28px !important; padding: 0 4px !important; border-radius: 7px !important; font-size: 11px !important; font-weight: 700 !important; }
.video-tool-tag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #ef5b52; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.video-tool-panel .upload small { font-size: 12px; color: #66707d; font-weight: 600; }
.video-tool-panel .grid2 { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.video-tool-custom-text { flex: 1 1 280px; min-width: min(280px, 100%); white-space: normal !important; }
.video-tool-custom-text input { flex: 1 1 180px; min-width: 0; min-height: 42px; padding: 0 10px; border: 1px solid #d4dae3; border-radius: 9px; background: #fff; color: #232a33; font-size: 14px; font-weight: 700; }
.video-tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.video-tool-actions button { min-height: 46px; padding: 0 18px; border: 1px solid #c9d1dc; border-radius: 10px; background: #fff; color: #2a3340; font-size: 15px; font-weight: 800; cursor: pointer; }
.video-tool-actions button:disabled { opacity: .45; cursor: not-allowed; }
.video-tool-actions .video-primary { border: 0; background: linear-gradient(120deg, #ef5b52, #e2372e); color: #fff; box-shadow: 0 6px 16px #e2372e3d; }
.video-tool-status { padding: 10px 12px; border-radius: 9px; background: #eef1f5; font-size: 13px; line-height: 1.6; color: #4a5462; }

@media (max-width: 900px) {
  .video-tool-layout { grid-template-columns: 1fr; }
  .video-tool-stage { max-width: 360px; }
  .public-video-picker { padding: 8px !important; }
  .video-picker-hero { min-height: 96px; padding: 12px; }
  .video-picker-hero strong { font-size: 22px; }
  .video-picker-hero span { font-size: 12px; }
}

/* 补九十七：内置模板选择弹窗 + 次按钮 */
.video-tool-panel .upload button + button { margin-left: 0; }
.video-secondary { border: 1px solid #ef5b52; border-radius: 10px; background: #fff; color: #e2372e; font-weight: 800; cursor: pointer; }
.video-template-dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(8, 12, 22, .66); }
.video-template-dialog[hidden] { display: none; }
.video-template-dialog__panel { display: grid; gap: 10px; width: min(860px, 94vw); max-height: 88vh; padding: 14px; border-radius: 14px; background: #fff; color: #232a33; overflow: auto; }
.video-template-dialog__panel header { display: flex; align-items: center; justify-content: space-between; }
.video-template-dialog__panel header strong { font-size: 17px; }
.video-template-dialog__panel header button { min-height: 34px; padding: 0 12px; border: 1px solid #c9d1dc; border-radius: 8px; background: #f4f6f9; font-weight: 700; cursor: pointer; }
.video-template-dialog__cats { display: flex; flex-wrap: wrap; gap: 6px; }
.video-template-dialog__cats button { min-height: 32px; padding: 0 12px; border: 1px solid #c9d1dc; border-radius: 999px; background: #fff; color: #434c58; font-size: 13px; font-weight: 700; cursor: pointer; }
.video-template-dialog__cats button.is-active { border-color: #ef5b52; background: #ef5b52; color: #fff; }
.video-template-dialog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; align-items: start; }
/* 批TGWDEV529：封面独立固定比例，长名称及同排卡片不再拉高自动行轨道。 */
.video-template-card { display: grid; gap: 4px; padding: 6px; min-width: 0; width: 100%; box-sizing: border-box; align-content: start; border: 1px solid #dfe4ec; border-radius: 10px; background: #fff; text-align: center; cursor: pointer; }
.video-template-card:hover { border-color: #ef5b52; }
.video-template-card__cover { width: 100%; aspect-ratio: 9 / 16; min-width: 0; overflow: hidden; border-radius: 7px; background: #e8ecf2; }
.video-template-card .video-template-card__cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-template-card > span { font-size: 13px; font-weight: 800; color: #232a33; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-template-card > small { font-size: 11px; color: #67707d; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-template-dialog__empty, .video-template-dialog__hint { margin: 0; padding: 8px; font-size: 13px; color: #67707d; text-align: center; }

/* TGWVPDEV001: the finished video uses the upper preview; only extra actions remain here. */
.video-tool-result { display: grid; gap: 8px; }
.video-tool-result[hidden] { display: none; }
.video-tool-stage.is-result > .video-tool-video,
.video-tool-stage.is-result > .video-tool-canvas,
.video-tool-stage.is-result > .video-tool-empty { display:none; }
.video-tool-stage > .video-tool-result__player { position:absolute; inset:0; width:100%; height:100%; max-width:none; max-height:none; margin:0; object-fit:contain; background:#000; }
.video-tool-stage > .video-tool-result__player[hidden] { display:none; }
.video-tool-result__bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; justify-content: center; }
.video-tool-result__bar .video-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: linear-gradient(120deg, #ef5b52, #e2372e); color: #fff; font-size: 15px; font-weight: 900; cursor: pointer; }
.video-tool-result__bar a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #c9d1dc; border-radius: 10px; background: #fff; color: #4a5462; font-size: 13px; font-weight: 700; text-decoration: none; }
.video-tool-result__bar span { font-size: 12px; line-height: 1.6; color: #5a6572; max-width: 420px; }

/* 补一百零二：弹窗关闭按钮显式深色 + 用户上传区 + 我的模板操作 */
.video-template-dialog__panel header button { color: #232a33 !important; background: #eef1f5; }
.video-template-upload { display: grid; gap: 6px; padding: 10px; border: 1px dashed #c9d1dc; border-radius: 10px; background: #f7f9fb; }
.video-template-upload__row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.video-template-upload__row input[type="file"] { width: 205px; max-width: 205px; font-size: 12px; border: 1px solid #c9d1dc; border-radius: 7px; padding: 6px 8px; background: #fff; }
.video-template-upload__row input[type="text"] { width: 150px; }
.video-template-upload__row select { width: auto !important; }
.video-template-upload__row input[type="text"], .video-template-upload__row select { min-height: 38px; padding: 0 10px; border: 1px solid #c9d1dc; border-radius: 8px; background: #fff; color: #232a33; font-size: 13px; }
.video-template-upload__row .video-primary { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: linear-gradient(120deg, #ef5b52, #e2372e); color: #fff; font-weight: 900; cursor: pointer; }
.video-template-upload__agree { display: flex; align-items: center; gap: 6px !important; flex-direction: row !important; font-size: 12px; color: #4a5462; }
.video-template-upload output { font-size: 12px; color: #67707d; }
.video-template-card { position: relative; }
.video-template-card__mine { position: static; display: flex; align-items: center; justify-content: center; height: 28px; min-height: 28px; max-height: 28px; box-sizing: border-box; margin: 2px; padding: 3px 8px; border-radius: 6px; background: #0a84ff; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; white-space: nowrap; }
.video-template-card__mine.is-danger { background: #e2372e; }

/* 补一百零三：自定义音乐行 + 结果区大按钮加强 */
.video-tool-custom-music { padding: 6px 10px; border: 1px dashed #c9d1dc; border-radius: 9px; background: #f7f9fb; }
.video-tool-custom-music input { max-width: 170px; font-size: 12px; }
.video-tool-result__bar .video-primary { animation: video-reshare-pulse 1.6s ease-in-out infinite; font-size: 17px; padding: 0 26px; }
@keyframes video-reshare-pulse { 0%, 100% { box-shadow: 0 0 0 0 #e2372e66; } 50% { box-shadow: 0 0 0 10px #e2372e00; } }

/* 补一百零五：我的上传区 + 录制徽标 + 结果大按钮全宽 */
.video-template-mine { padding: 8px 10px; border: 1px solid #e3e8f0; border-radius: 10px; background: #fbfcfe; }
.video-template-mine h4 { margin: 0 0 8px; font-size: 13px; color: #2a3340; }
.video-tool-record-badge { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; padding: 8px 16px; border-radius: 999px; background: rgba(226, 55, 46, .92); color: #fff; font-size: 15px; font-weight: 900; animation: video-reshare-pulse 1.2s ease-in-out infinite; pointer-events: none; }
.video-tool-result__bar .video-primary { width: 100%; max-width: 430px; min-height: 54px; font-size: 18px; }

/* 补一百零六：可拖拽发送（DownloadURL 拖进微信聊天窗） */
.video-tool-result__player[draggable="true"], .video-tool-result__bar [data-tool-reshare][draggable="true"] { cursor: grab; }
.video-tool-result__bar [data-tool-reshare]:active { cursor: grabbing; }

/* 补一百一十二：单按钮两相流 + 结果区精简 */
.video-tool-actions .is-ready { animation: video-reshare-pulse 1.2s ease-in-out infinite; }
.video-tool-result__hint2 { margin: 0; text-align: center; font-size: 13px; color: #5a6572; line-height: 1.6; }

/* TGWVPDEV001: one shared workflow; the mobile preview never pins over later controls. */
.video-tool-layout { display:block; }
.video-tool-panel { grid-template-columns:minmax(0,420px) minmax(0,1fr); }
.video-tool-step { min-width:0; margin:0; padding:10px; border:1px solid #d6dfe7; border-radius:10px; display:grid; grid-template-columns:minmax(0,1fr); gap:10px; grid-column:2; }
.video-tool-step legend { font-size:14px; font-weight:800; padding:0 6px; }
.video-tool-stage-wrap { grid-column:1; grid-row:1 / span 6; gap:8px; min-width:0; }
.video-tool-stage-wrap > button { min-height:40px; border:1px solid #c9d1dc; border-radius:8px; background:#fff; color:#273440; padding:6px 12px; }
.video-tool-stage-wrap > small { text-align:center; font-size:12px; }
.video-tool-panel > .video-tool-result, .video-tool-panel > .video-tool-status { grid-column:2; min-width:0; }
/* TGWVPDEV001: equal controls communicate equal actions; promotion is not emphasized. */
.public-video-picker .video-tool-panel [data-tool-upload-button],
.public-video-picker .video-tool-panel [data-tool-template-button],
.public-video-picker .video-tool-panel [data-tool-add-play],
.public-video-picker .video-tool-panel [data-tool-custom-play-open] { min-height:40px; padding:6px 12px; border:1px solid #c9d1dc; border-radius:10px; background:#fff; color:#273440; font-size:14px; font-weight:700; box-shadow:none; }
.public-video-picker .video-tool-addplay [data-tool-add-play],
.public-video-picker .video-tool-addplay [data-tool-custom-play-open] { width:112px; flex:0 0 112px; }
/* TGWVIDDEV044: compact actions keep their text width; preview settings belong to the action area. */
.public-video-picker .video-tool-actions.video-tool-delivery-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.public-video-picker .video-tool-delivery-actions .video-tool-result:not([hidden]) { display:contents; }
.public-video-picker .video-tool-delivery-actions button,
.public-video-picker .video-tool-result__bar button { flex:0 0 auto; width:auto; min-width:0; min-height:34px; padding:6px 12px; border-radius:8px; font-size:13px; white-space:nowrap; }
.video-tool-music-row { display:flex; align-items:center; gap:8px; flex:1 1 100%; min-width:0; }
.video-tool-music-row > label:first-child { flex:1; min-width:0; }
.video-tool-music-row select { flex:1; min-width:0; }
.video-tool-music-row [data-tool-upload-music],.video-tool-preview-controls button { min-height:40px; padding:6px 10px; border:1px solid #c9d1dc; border-radius:10px; background:#fff; color:#273440; font-size:13px; font-weight:700; }
.video-tool-preview-controls { display:inline-flex; flex:0 0 auto; align-items:center; flex-wrap:wrap; justify-content:flex-start; gap:6px; width:auto; min-width:0; }
.video-tool-preview-controls label { min-width:0; }
.video-tool-preview-controls select { max-width:110px; }
@media (max-width:700px) {
  .public-video-picker .video-picker-hero { min-height:0; padding:10px; margin-bottom:8px; gap:4px; }
  .public-video-picker .video-picker-hero strong { font-size:19px; letter-spacing:0; }
  .public-video-picker .video-picker-hero span { font-size:11px; }
  .public-video-picker .video-tool-panel { grid-template-columns:minmax(0,1fr); padding:8px; gap:10px; }
  .public-video-picker .video-tool-step,
  .public-video-picker .video-tool-stage-wrap,
  .public-video-picker .video-tool-panel > .video-tool-result,
  .public-video-picker .video-tool-panel > .video-tool-status { grid-column:1; grid-row:auto; }
  .public-video-picker .video-tool-stage-wrap { position:static; padding:0; gap:6px; }
  .public-video-picker .video-tool-stage { width:min(100%,calc(34vh * 9 / 16)); max-width:180px; }
  .public-video-picker .video-tool-panel .grid2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .public-video-picker .video-tool-panel .grid2 > label { display:flex; flex-direction:row; align-items:center; gap:4px; min-width:0; font-size:11px; white-space:nowrap; }
  .public-video-picker .video-tool-panel .grid2 > .video-tool-custom-text,
  .public-video-picker .video-tool-panel .grid2 > .video-tool-custom-music,
  .public-video-picker .video-tool-music-row { grid-column:1 / -1; min-width:0; }
  .public-video-picker .video-tool-step { padding:7px; gap:6px; }
  .public-video-picker .video-tool-music-row select { width:0; }
  .public-video-picker .video-tool-music-row .video-tool-custom-music { border:0; padding:0; margin:0; min-width:0; }
  .public-video-picker .video-tool-music-row > label { font-size:12px; }
  .public-video-picker .video-tool-preview-controls { justify-content:flex-start; gap:6px; }
  .public-video-picker .video-tool-preview-controls label { flex:0 0 auto; }
  .public-video-picker .video-tool-preview-controls select { flex:0 0 auto; min-width:0; width:auto; max-width:110px; }
  .public-video-picker .video-tool-panel .grid2 select { flex:1; min-width:0; width:0; height:36px; padding:0 3px; font-size:12px; }
  .public-video-picker .video-tool-custom-text input { flex:auto; }
  .public-video-picker .video-tool-panel button { min-height:40px; padding:6px 10px; font-size:13px; }
  .public-video-picker .video-tool-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:8px; }
  .public-video-picker .video-tool-addplay { display:grid; grid-template-columns:minmax(0,1fr) 72px 72px; gap:5px; min-width:0; }
  .public-video-picker .video-tool-addplay > label { flex:1; min-width:0; font-size:0; gap:0; }
  .public-video-picker .video-tool-addplay select { flex:1; width:100%; min-width:0; font-size:12px; padding:0 4px; }
  .public-video-picker .video-tool-addplay [data-tool-add-play],
  .public-video-picker .video-tool-addplay [data-tool-custom-play-open] { flex:0 0 72px; width:72px; padding:4px; font-size:12px; }
  .public-video-picker .video-tool-custom-play { flex-direction:column; padding:8px; }
  .public-video-picker .video-tool-custom-play .prop-settings,
  .public-video-picker .video-tool-custom-play .prop-textarea-col { width:100%; min-width:0; }
  .public-video-picker .video-tool-custom-play .prop-textarea-col textarea { min-height:96px; height:96px; }
  .public-video-picker .video-tool-selected { display:grid; grid-template-columns:minmax(0,1fr); }
  .public-video-picker .video-tool-tag { box-sizing:border-box; width:100%; min-width:0; max-width:100%; flex-wrap:nowrap; gap:5px; padding:5px 8px; font-size:12px; }
  .public-video-picker .video-tool-tag__label { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .public-video-picker .video-tool-tag [data-remove-play] { flex:0 0 28px; width:28px; min-height:28px; height:28px; padding:0; }
}

@media(max-width:700px) {
  .public-video-picker .video-tool-panel .upload { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; white-space:normal; min-width:0; }
  .public-video-picker .video-tool-panel .upload button { width:100%; padding:6px 4px; }
  .public-video-picker .video-tool-panel .upload small { grid-column:1 / -1; min-width:0; overflow-wrap:anywhere; font-size:11px; }
}
