.video-section {
  position: relative;
  overflow: hidden;
  background: #0d1f38;
  color: #fff;
}

.video-section::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  inset-inline-end: -210px;
  top: -220px;
  border-radius: 50%;
  background: rgba(114, 81, 245, .28);
  filter: blur(90px);
}

.video-section .section-head {
  position: relative;
}

.video-section .section-tag {
  color: #c9f45b;
}

.video-section .section-head p {
  color: #b8c5d2;
}

.video-studio {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .28);
  background: #f7f5ef;
  color: #0d1f38;
  box-shadow: 14px 14px 0 #7251f5;
}

.video-tool-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #0d1f38;
  background: #fff;
}

.video-tool-tab {
  min-height: 150px;
  padding: 24px;
  text-align: start;
  border: 0;
  border-inline-start: 1px solid #d7d8d2;
  background: transparent;
  color: #0d1f38;
  cursor: pointer;
}

.video-tool-tab:first-child {
  border-inline-start: 0;
}

.video-tool-tab > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0ecff;
  color: #7251f5;
  font-size: 20px;
}

.video-tool-tab strong {
  display: block;
  margin-top: 15px;
  font-size: 16px;
  line-height: 1.4;
}

.video-tool-tab small {
  display: block;
  margin-top: 6px;
  color: #647084;
  font-size: 10px;
  line-height: 1.65;
}

.video-tool-tab.active {
  background: #7251f5;
  color: #fff;
}

.video-tool-tab.active > span {
  background: #c9f45b;
  color: #0d1f38;
}

.video-tool-tab.active small {
  color: #e4dfff;
}

.video-body {
  padding: 35px;
}

.video-active-title {
  margin-bottom: 26px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.video-active-title small {
  color: #7251f5;
  font-size: 10px;
  font-weight: 900;
}

.video-active-title h3 {
  margin: 7px 0 0;
  font-size: 36px;
  line-height: 1.2;
}

.video-active-title p {
  margin: 8px 0 0;
  color: #647084;
  font-size: 12px;
}

.video-local-chip {
  padding: 10px 14px;
  border-radius: 30px;
  background: #c9f45b;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.video-message {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e6b9ae;
  background: #fff0ec;
  color: #8f2715;
  font-size: 10px;
}

.video-message.visible {
  display: block;
}

.video-dropzone {
  min-height: 335px;
  padding: 36px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #8993a2;
  background: #fff;
  cursor: pointer;
  transition: .2s ease;
}

.video-dropzone.dragging {
  border-color: #7251f5;
  background: #f0ecff;
  transform: translateY(-3px);
}

.video-dropzone input {
  display: none;
}

.video-drop-content {
  display: grid;
  justify-items: center;
}

.video-upload-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0d1f38;
  color: #c9f45b;
  font-size: 31px;
}

.video-drop-content strong {
  margin-top: 22px;
  font-size: 18px;
}

.video-drop-content small {
  margin-top: 8px;
  color: #647084;
  font-size: 10px;
}

.video-drop-content b {
  margin-top: 21px;
  padding: 12px 22px;
  background: #7251f5;
  color: #fff;
  font-size: 10px;
}

.video-editor {
  display: none;
  grid-template-columns: 1.24fr .76fr;
  gap: 24px;
}

.video-editor.visible {
  display: grid;
}

.video-preview-panel,
.video-controls-panel {
  border: 1px solid #d7d8d2;
  background: #fff;
}

.video-player-stage {
  min-height: 430px;
  padding: 18px;
  display: grid;
  place-items: center;
  background: #080f1b;
}

.video-player-stage video,
.video-player-stage canvas {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #000;
}

.video-player-stage canvas {
  display: none;
}

.video-player-stage.result-visible video {
  display: none;
}

.video-player-stage.result-visible canvas {
  display: block;
}

.video-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #d7d8d2;
}

.video-stats div {
  padding: 14px 8px;
  text-align: center;
  border-inline-start: 1px solid #d7d8d2;
}

.video-stats div:first-child {
  border-inline-start: 0;
}

.video-stats span {
  display: block;
  color: #647084;
  font-size: 8px;
}

.video-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  direction: ltr;
}

.video-controls-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.video-file-row {
  padding-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 14px;
  border-bottom: 1px solid #d7d8d2;
}

.video-file-row span {
  color: #647084;
  font-size: 9px;
}

.video-file-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.video-remove-btn {
  grid-row: 1 / 3;
  grid-column: 2;
  min-width: 104px;
  min-height: 44px;
  padding: 9px 15px;
  border: 2px solid #a43e2a;
  background: #fff0ec;
  color: #8f2715;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.video-control-list {
  padding: 20px 0;
  display: grid;
  gap: 16px;
}

.video-control-list label {
  display: grid;
  gap: 8px;
  color: #39495d;
  font-size: 10px;
  font-weight: 700;
}

.video-control-list label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-control-list input[type="text"],
.video-control-list select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #ccd1d8;
  background: #fff;
  color: #0d1f38;
}

.video-control-list input[type="range"] {
  width: 100%;
  accent-color: #7251f5;
}

.video-note {
  padding: 14px;
  background: #f0ecff;
  color: #51486a;
  font-size: 10px;
  line-height: 1.8;
}

.video-report {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.video-report.visible {
  display: grid;
}

.video-report div {
  padding: 11px;
  background: #f7f5ef;
}

.video-report span {
  display: block;
  color: #647084;
  font-size: 8px;
}

.video-report b {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  direction: ltr;
}

.video-action-stack {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.video-process-btn,
.video-download-btn,
.video-preview-btn {
  width: 100%;
  min-height: 52px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #0d1f38;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.video-process-btn {
  background: #0d1f38;
  color: #fff;
}

.video-process-btn span {
  color: #c9f45b;
  font-size: 18px;
}

.video-process-btn:disabled {
  opacity: .55;
  cursor: wait;
}

.video-download-btn,
.video-preview-btn {
  display: none;
}

.video-download-btn.visible,
.video-preview-btn.visible {
  display: flex;
}

.video-download-btn {
  background: #c9f45b;
  color: #0d1f38;
}

.video-preview-btn {
  background: #fff;
  color: #0d1f38;
}

.video-privacy-line {
  margin: 13px 0 0;
  text-align: center;
  color: #647084;
  font-size: 8px;
}

@media (max-width: 1050px) {
  .video-tool-menu {
    grid-template-columns: 1fr 1fr;
  }

  .video-tool-tab:nth-child(3) {
    border-inline-start: 0;
  }

  .video-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .video-studio {
    box-shadow: 8px 8px 0 #7251f5;
  }

  .video-tool-tab {
    min-height: 132px;
    padding: 18px 14px;
  }

  .video-tool-tab strong {
    font-size: 13px;
  }

  .video-tool-tab small {
    font-size: 9px;
  }

  .video-body {
    padding: 21px 13px;
  }

  .video-active-title {
    align-items: start;
    flex-direction: column;
  }

  .video-active-title h3 {
    font-size: 30px;
  }

  .video-dropzone {
    min-height: 290px;
    padding: 25px 15px;
  }

  .video-player-stage {
    min-height: 270px;
    padding: 10px;
  }

  .video-stats {
    grid-template-columns: 1fr 1fr;
  }

  .video-stats div:nth-child(3) {
    border-inline-start: 0;
    border-top: 1px solid #d7d8d2;
  }

  .video-stats div:nth-child(4) {
    border-top: 1px solid #d7d8d2;
  }

  .video-controls-panel {
    padding: 18px 14px;
  }
}

/* Video editor v9 controls */
.video-player-stage {
  position: relative;
}

.video-player-stage video {
  width: auto;
  max-width: 100%;
  height: auto;
}

.video-tool-tab:nth-child(4n+1) {
  border-inline-start: 0;
}

.video-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.video-control-list input[type="number"],
.video-control-list input[type="color"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #ccd1d8;
  background: #fff;
  color: #0d1f38;
}

.video-control-list input[type="color"] {
  padding: 5px;
}

.video-range-value {
  margin-inline-start: auto;
  color: #7251f5;
  font-size: 10px;
  font-weight: 900;
}

.video-background-upload {
  min-height: 78px;
  padding: 13px;
  display: grid !important;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 3px 12px !important;
  border: 1px dashed #7251f5;
  background: #f0ecff;
  color: #302366 !important;
  cursor: pointer;
}

.video-background-upload[hidden],
#videoBackgroundColourField[hidden],
#videoBlurRegionControls[hidden] {
  display: none !important;
}

.video-background-upload input {
  display: none;
}

.video-background-upload > span {
  width: 40px;
  height: 40px;
  grid-row: 1 / 3;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  background: #7251f5;
  color: #fff;
  font-size: 21px;
}

.video-background-upload b {
  font-size: 11px;
}

.video-background-upload small {
  color: #647084;
  font-size: 9px;
}

.video-check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  padding: 12px;
  border: 1px solid #d7d8d2;
  background: #fff;
  line-height: 1.7;
}

.video-check-row input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: #7251f5;
}

.video-mark-instruction {
  padding: 15px;
  border: 2px solid #7251f5;
  background: #f0ecff;
  color: #302366;
}

.video-mark-instruction b {
  display: block;
  font-size: 13px;
}

.video-mark-instruction span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.7;
}

.video-mark-selector {
  position: absolute;
  z-index: 7;
  display: none;
  min-width: 28px;
  min-height: 28px;
  border: 3px solid #7251f5;
  background: rgba(114,81,245,.2);
  box-shadow: 0 0 0 2px #c9f45b,0 8px 26px rgba(0,0,0,.35);
  cursor: move;
  touch-action: none;
  user-select: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.video-mark-selector.visible {
  display: block;
}

.video-mark-selector.dragging {
  cursor: grabbing;
}

.video-mark-selector::before {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 5px 8px;
  transform: translate(-50%,-50%);
  white-space: nowrap;
  background: #0d1f38;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  pointer-events: none;
}

.video-mark-selector:focus-visible {
  outline: 4px solid rgba(201,244,91,.9);
  outline-offset: 4px;
}

.video-mark-handle {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #0d1f38;
  border-radius: 50%;
  background: #c9f45b;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.video-mark-handle.nw { left: -12px; top: -12px; cursor: nwse-resize; }
.video-mark-handle.ne { right: -12px; top: -12px; cursor: nesw-resize; }
.video-mark-handle.sw { left: -12px; bottom: -12px; cursor: nesw-resize; }
.video-mark-handle.se { right: -12px; bottom: -12px; cursor: nwse-resize; }

@media (max-width: 1050px) {
  .video-tool-tab:nth-child(4n+1) { border-inline-start: 1px solid #d7d8d2; }
  .video-tool-tab:nth-child(odd) { border-inline-start: 0; }
}

@media (max-width: 680px) {
  .video-control-grid { grid-template-columns: 1fr; }
  .video-mark-selector::before { font-size: 7px; }
  .video-mark-handle { width: 25px; height: 25px; }
  .video-mark-handle.nw { left: -14px; top: -14px; }
  .video-mark-handle.ne { right: -14px; top: -14px; }
  .video-mark-handle.sw { left: -14px; bottom: -14px; }
  .video-mark-handle.se { right: -14px; bottom: -14px; }
}

.video-merge-picker {
  min-height: 82px;
  padding: 14px;
  display: grid !important;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 3px 12px !important;
  border: 1px dashed #7251f5;
  background: #f0ecff;
  color: #302366 !important;
  cursor: pointer;
}

.video-merge-picker input {
  display: none;
}

.video-merge-picker > span {
  width: 42px;
  height: 42px;
  grid-row: 1 / 3;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  background: #7251f5;
  color: #fff;
  font-size: 23px;
}

.video-merge-picker b {
  font-size: 12px;
}

.video-merge-picker small {
  color: #647084;
  font-size: 9px;
}

.video-merge-list {
  max-height: 285px;
  display: grid;
  gap: 7px;
  overflow: auto;
}

.video-merge-item {
  min-height: 58px;
  padding: 8px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 30px 30px 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid #d7d8d2;
  background: #fff;
}

.video-merge-item > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0d1f38;
  color: #c9f45b;
  font-size: 10px;
  font-weight: 900;
}

.video-merge-item div {
  min-width: 0;
}

.video-merge-item b,
.video-merge-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-merge-item b {
  font-size: 9px;
}

.video-merge-item small {
  margin-top: 4px;
  color: #647084;
  font-size: 8px;
}

.video-merge-item button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #ccd1d8;
  background: #f7f5ef;
  color: #0d1f38;
  font-weight: 900;
  cursor: pointer;
}

.video-merge-item button.danger {
  border-color: #e1b4aa;
  background: #fff0ec;
  color: #a43e2a;
}

/* =========================================================
   NUJIZ VIDEO RELATED TOOLS FIX
   Fix cards whose <span> contains the tool title
   ========================================================= */

.tool-related-grid > a.tool-related-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    grid-template-columns: none !important;

    min-width: 0 !important;
    min-height: 96px !important;

    padding: 18px 20px !important;

    text-align: center !important;
    overflow: hidden !important;
}

/* tool-page.css treats direct span as an icon.
   In video related cards this span is the tool name. */
.tool-related-grid > a.tool-related-card > span {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    display: block !important;

    padding: 0 !important;
    margin: 0 !important;

    border-radius: 0 !important;
    background: none !important;

    color: #1d2d44 !important;

    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.55 !important;

    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

/* Keep two balanced columns on desktop */
@media (min-width: 901px) {
    .tool-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 900px) {
    .tool-related-grid > a.tool-related-card {
        min-height: 78px !important;
        padding: 15px 16px !important;
    }
}

@media (max-width: 520px) {
    .tool-related-grid > a.tool-related-card > span {
        font-size: 15px !important;
    }
}

/* ========================================================= */



/* NUJIZ MERGE VIDEO PICKER PRO */

.video-merge-picker{
  position:relative;
  min-height:92px;
  padding:16px 18px !important;
  display:grid !important;
  grid-template-columns:58px 1fr !important;
  grid-template-rows:auto auto !important;
  column-gap:14px !important;
  row-gap:3px !important;
  align-items:center !important;
  background:linear-gradient(135deg,#faf9ff 0%,#f5f2ff 100%) !important;
  border:1.5px dashed #8b6cf7 !important;
  border-radius:16px !important;
  cursor:pointer !important;
  transition:.2s ease !important;
}

.video-merge-picker:hover{
  background:#f3efff !important;
  border-color:#6d42f5 !important;
  box-shadow:0 8px 24px rgba(109,66,245,.10) !important;
  transform:translateY(-1px);
}

.video-merge-picker input{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  opacity:0 !important;
  cursor:pointer !important;
}

.video-merge-picker .video-merge-icon{
  grid-column:1 !important;
  grid-row:1 / span 2 !important;
  width:54px !important;
  height:54px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:15px !important;
  background:#fff !important;
  color:#6d42f5 !important;
  border:1px solid #e6defe !important;
  box-shadow:0 5px 15px rgba(109,66,245,.10) !important;
}

.video-merge-picker .video-merge-icon svg{
  width:34px !important;
  height:34px !important;
  display:block !important;
}

.video-merge-picker b{
  grid-column:2 !important;
  grid-row:1 !important;
  margin:0 !important;
  font-size:14px !important;
  font-weight:800 !important;
  color:#211b3a !important;
  line-height:1.4 !important;
}

.video-merge-picker small{
  grid-column:2 !important;
  grid-row:2 !important;
  margin:0 !important;
  font-size:11px !important;
  line-height:1.6 !important;
  color:#77728b !important;
}

@media(max-width:560px){
  .video-merge-picker{
    min-height:84px;
    grid-template-columns:50px 1fr !important;
    padding:14px !important;
  }

  .video-merge-picker .video-merge-icon{
    width:48px !important;
    height:48px !important;
    border-radius:13px !important;
  }

  .video-merge-picker .video-merge-icon svg{
    width:30px !important;
    height:30px !important;
  }
}


/* Smart Cleanmark duration notice */
.cleanmark-duration-note{
    display:flex;
    flex-direction:column;
    gap:7px;
    margin:0 0 16px;
    padding:14px 16px;
    border:1px solid #f1d27a;
    border-radius:14px;
    background:#fff9e8;
    color:#5c4700;
    line-height:1.7;
}

.cleanmark-duration-note strong{
    font-size:15px;
    font-weight:900;
}

.cleanmark-duration-note span{
    font-size:13px;
}

.cleanmark-duration-note a{
    color:#5b36e8;
    font-weight:800;
    text-decoration:underline;
}

@media(max-width:700px){
    .cleanmark-duration-note{
        padding:12px 13px;
        border-radius:12px;
    }
}

/* =========================================================
   NUJIZ VIDEO BACKGROUND AI STATUS — DARK MODE FIX
   ========================================================= */

body[data-tool-scope="video"] #nujizVideoAiStatus {
    background:#f3f6fa !important;
    color:#263447 !important;
    -webkit-text-fill-color:#263447 !important;
    border:1px solid #d7dee8 !important;
}

html[data-theme="dark"] body[data-tool-scope="video"] #nujizVideoAiStatus {
    background:#202735 !important;
    color:#dce4ef !important;
    -webkit-text-fill-color:#dce4ef !important;
    border:1px solid #414c5d !important;
}

html[data-theme="dark"] body[data-tool-scope="video"] #nujizVideoAiStatus[data-status="ok"] {
    background:#1c3025 !important;
    color:#c9f2d5 !important;
    -webkit-text-fill-color:#c9f2d5 !important;
    border-color:#315d40 !important;
}

html[data-theme="dark"] body[data-tool-scope="video"] #nujizVideoAiStatus[data-status="error"] {
    background:#382224 !important;
    color:#ffd5d5 !important;
    -webkit-text-fill-color:#ffd5d5 !important;
    border-color:#704044 !important;
}

/* =========================================================
   NUJIZ AI VIDEO BACKGROUND — PREVIEW PRIORITY
   AI canvas must replace the original video while active.
   ========================================================= */

.video-player-stage.nujiz-ai-preview-active #videoPreview {
    display: none !important;
}

.video-player-stage.nujiz-ai-preview-active #videoCanvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 5;
    width: 100%;
    height: auto;
}

.video-player-stage.nujiz-ai-preview-active {
    position: relative;
}

/* ===== NUJIZ BACKGROUND IMAGE PICKER ===== */

.video-bg-type-field{
    grid-column:1/-1;
}

.video-bg-type-field>span{
    display:block;
    margin-bottom:10px;
    font-weight:800;
}

.video-bg-type-switch{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.video-bg-type-switch button{
    appearance:none;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(255,255,255,.035);
    color:inherit;
    min-height:58px;
    border-radius:12px;
    padding:10px 14px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    font:inherit;
    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.video-bg-type-switch button:hover{
    transform:translateY(-1px);
    border-color:rgba(139,92,246,.55);
}

.video-bg-type-switch button.active{
    border-color:#7c4dff;
    background:rgba(124,77,255,.14);
    box-shadow:0 0 0 1px rgba(124,77,255,.18);
}

.video-bg-colour-icon{
    width:20px;
    height:20px;
    border-radius:6px;
    background:linear-gradient(135deg,#6d42f5,#c9f45b);
    display:block;
}

.video-bg-image-icon{
    width:22px;
    height:22px;
    border-radius:5px;
    border:1px solid currentColor;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
}

.video-background-upload{
    margin-top:12px;
    border:1px dashed rgba(139,92,246,.65);
    border-radius:14px;
    min-height:100px;
    padding:18px;
    cursor:pointer;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    text-align:center;
    background:rgba(124,77,255,.06);
}

.video-background-upload:not([hidden]){
    display:flex;
}

.video-background-upload input{
    position:absolute;
    width:1px;
    height:1px;
    opacity:0;
    pointer-events:none;
}

.video-background-upload>span{
    font-size:28px;
    line-height:1;
}

.video-background-upload>b{
    font-weight:800;
}

.video-background-upload>small{
    opacity:.7;
}

@media(max-width:640px){
    .video-bg-type-switch{
        grid-template-columns:1fr 1fr;
    }
}


/* ===== NUJIZ EXTRACT VIDEO FRAME V2 ===== */

body[data-tool-id="frame"] .nujiz-frame-v2{
  margin-top:18px;
  padding:18px;
  border:1px solid #dfe5ee;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 30px rgba(15,23,42,.05);
}

body[data-tool-id="frame"] .nfv2-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

body[data-tool-id="frame"] .nfv2-head strong{
  display:block;
  font-size:16px;
  font-weight:800;
}

body[data-tool-id="frame"] .nfv2-head small{
  display:block;
  margin-top:5px;
  opacity:.68;
  line-height:1.55;
}

body[data-tool-id="frame"] #nfv2Clock{
  flex:0 0 auto;
  padding:9px 12px;
  border-radius:10px;
  background:#f3f5f8;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-weight:800;
  direction:ltr;
}

body[data-tool-id="frame"] .nfv2-timeline{
  width:100%;
  cursor:pointer;
  accent-color:#7447f5;
}

body[data-tool-id="frame"] .nfv2-actions{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
  margin-top:15px;
}

body[data-tool-id="frame"] .nfv2-actions button{
  min-height:44px;
  border:1px solid #dfe5ee;
  border-radius:12px;
  background:#f8fafc;
  color:#172033;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}

body[data-tool-id="frame"] .nfv2-actions button:hover{
  border-color:#7447f5;
}

body[data-tool-id="frame"] .nfv2-info{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}

body[data-tool-id="frame"] .nfv2-info span{
  padding:12px 14px;
  border:1px solid #e4e9f0;
  border-radius:12px;
  font-size:13px;
}

body[data-tool-id="frame"] .nfv2-info b{
  display:block;
  margin-top:4px;
  font-size:14px;
  direction:ltr;
}

body[data-tool-id="frame"] .nfv2-quality{
  margin-top:15px;
  padding-top:15px;
  border-top:1px solid #e5e9ef;
}

body[data-tool-id="frame"] .nfv2-quality > label{
  display:block;
  margin-bottom:9px;
  font-weight:800;
}

body[data-tool-id="frame"] .nfv2-quality > div{
  display:flex;
  align-items:center;
  gap:12px;
}

body[data-tool-id="frame"] .nfv2-quality input{
  flex:1;
  accent-color:#7447f5;
}

body[data-tool-id="frame"] .nfv2-quality small{
  display:block;
  margin-top:7px;
  opacity:.65;
}

body[data-tool-id="frame"] .nfv2-quality.is-disabled{
  opacity:.48;
}

/* Dark mode */
html[data-theme="dark"] body[data-tool-id="frame"] .nujiz-frame-v2{
  background:#111827;
  border-color:#2d3748;
  color:#f8fafc;
  box-shadow:none;
}

html[data-theme="dark"] body[data-tool-id="frame"] #nfv2Clock,
html[data-theme="dark"] body[data-tool-id="frame"] .nfv2-actions button{
  background:#182131;
  border-color:#334155;
  color:#fff;
}

html[data-theme="dark"] body[data-tool-id="frame"] .nfv2-info span{
  border-color:#334155;
  background:#141d2b;
}

html[data-theme="dark"] body[data-tool-id="frame"] .nfv2-quality{
  border-color:#334155;
}

@media (max-width:640px){
  body[data-tool-id="frame"] .nfv2-head{
    display:block;
  }

  body[data-tool-id="frame"] #nfv2Clock{
    display:inline-block;
    margin-top:12px;
  }

  body[data-tool-id="frame"] .nfv2-actions{
    grid-template-columns:1fr 1fr;
  }

  body[data-tool-id="frame"] #nfv2Play{
    grid-column:1 / -1;
    grid-row:1;
  }

  body[data-tool-id="frame"] .nfv2-info{
    grid-template-columns:1fr;
  }
}

/* ===== END NUJIZ EXTRACT VIDEO FRAME V2 ===== */
