
    :root {
      --primary: #222;
      --primary-bg: #fff;
      --accent: #2a77e3;
      --border: #e1e1e1;
      --radius: 14px;
      --shadow: 0 4px 24px #0001;
      --hover: #f4f4f6;
    }
    body {
      background: #f7f7f9;
      font-family: system-ui;
      margin: 0;
      color: var(--primary);
      font-size: 17px;
    }
    .main-layout {
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 32px;
      padding: 44px 12px 44px 12px;
    }
    .upload-block, .left-block, .right-block {
      background: var(--primary-bg);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .upload-block {
      min-width: 370px;
    max-width: 400px;
      padding: 30px 15px 24px 15px;
      margin-right: 0;
      gap: 13px;
    }
    .left-block {
      min-width: 425px;
      max-width: 440px;
      padding: 32px 30px 26px 30px;
      margin-bottom: 12px;
      gap: 18px;
    }
    .right-block {
      min-width: 370px;
      max-width: 400px;
      padding: 32px 30px 26px 30px;
      align-items: stretch;
      gap: 0;
    }
    h3 {
      font-size: 1.15rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: #434447;
      display: flex;
      align-items: center;
      gap: 7px;
      margin: 0 0 10px 0;
    }
    /* Canvas */
    #canvasBox {
      position: relative;
      width: 360px;
      height: 640px;
      background: #111;
      border-radius: 18px;
      box-shadow: 0 2px 14px #0002;
      border: 2px solid var(--border);
      overflow: hidden;
      user-select: none;
      margin-bottom: 0;
    }
    #videoCanvas {
      width: 360px;
      height: 640px;
      display: block;
      border-radius: inherit;
      background: transparent;
    }
    /* Player Controls */
    .controls-row {
      display: flex;
      gap: 13px;
      margin: 18px 0 0 0;
      justify-content: center;
    }
    .player-btn {
      background: var(--hover);
      border: none;
      border-radius: 8px;
      width: 46px;
      height: 46px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      color: #666;
      cursor: pointer;
      box-shadow: 0 1px 6px #0001;
      transition: background 0.17s, color 0.15s, transform 0.13s;
    }
    .player-btn:active { transform: scale(0.97);}
    .player-btn:hover {
      background: #434447;
      color: #fff;
    }
    /* Volume Sliders */
    .volumes-block {
      display: flex;
      flex-direction: column;
      gap: 11px;
      margin: 18px 0 8px 0;
      width: 100%;
    }
    .volume-row {
      display: flex;
      align-items: center;
      gap: 13px;
      font-size: 1em;
      width: 100%;
    }
    .volume-row label {
      min-width: 112px;
      color: #222;
      font-size: 0.99em;
    }
    .volume-row input[type=range] {
      flex: 1.7;
      accent-color: var(--primary);
      margin-right: 8px;
      border-radius: 6px;
      height: 2px;
    }
    .volume-row span {
      width: 38px;
      text-align: right;
      font-size: 15px;
      color: #888;
    }
    /* Масштаб */
    .scale-row {
      display: flex;
      align-items: center;
      margin: 13px 0 0 0;
      width: 100%;
      gap: 10px;
      font-size: 0.98em;
      user-select: none;
    }
    .scale-row input[type=checkbox] {
      accent-color: #434447;
      width: 18px;
      height: 18px;
    }
    /* Скачать */
    #downloadBtn {
      width: 100%;
      margin-top: 16px;
      padding: 13px 0 12px 0;
      font-size: 1.09em;
      border-radius: 11px;
      background: #434447;
      color: #fff;
      border: none;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
      box-shadow: 0 2px 12px #0001;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
    }
    #downloadBtn:hover { background: #4e97bf; }
    /* Progress bar */
    #progressBarWrap {
      width: 100%;
      background: #e4e4e4;
      border-radius: 7px;
      margin: 14px 0 0 0;
      display: none;
      height: 14px;
      box-shadow: 0 1px 5px #0001;
      overflow: hidden;
    }
    #progressBar {
      width: 0%;
      height: 14px;
      background: #434447;
      border-radius: 7px;
      transition: width 0.22s;
    }
    /* Фильтры с иконками */
    .filters-panel {
      padding: 0 0 0 0;
    }
    .filters-title {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 1.14rem;
      font-weight: 700;
      margin: 0 0 10px 0;
      color: var(--primary);
    }
    .slider-group {
      display: flex;
      align-items: center;
      gap: 13px;
      margin-bottom: 14px;
      position: relative;
      transition: background 0.15s;
      border-radius: 7px;
      padding: 3px 9px 3px 0;
    }
    .slider-group:focus-within,
    .slider-group:hover {
      background: var(--hover);
      box-shadow: 0 2px 10px #0001;
    }
    .slider-icon {
      font-size: 22px;
      width: 32px;
      text-align: center;
      color: #bababa;
      transition: color 0.22s, transform 0.18s;
      pointer-events: none;
    }
    .slider-group:focus-within .slider-icon,
    .slider-group:hover .slider-icon {
      color: var(--primary);
      transform: rotate(-12deg) scale(1.13);
    }
    .slider-label {
      flex: 1.2;
      font-size: 1em;
      color: #181818;
      font-weight: 400;
    }
    .slider-val {
      width: 54px;
      text-align: right;
      font-size: 15px;
      color: #888;
      flex-shrink: 0;
      transition: color 0.2s;
    }
    .slider-group:focus-within .slider-val,
    .slider-group:hover .slider-val {
      color: var(--primary);
    }
    .slider {
      flex: 2.2;
      accent-color: var(--primary);
      background: #e1e1e1;
      border-radius: 5px;
      height: 2px;
      transition: accent-color 0.18s;
    }
    .slider:focus { accent-color: #111; }
    /* Switches */
    .mirror-title {
      font-size: 1.08rem;
      font-weight: 600;
      margin-top: 14px;
      margin-bottom: 8px;
      display: flex;
      gap: 7px;
      align-items: center;
      color: #222;
    }
    .mirror-switches {
      display: flex;
      flex-direction: row;
      gap: 20px;
      margin-bottom: 18px;
      margin-top: 5px;
    }
    .switch-row {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 15px;
    }
    .switch-slider {
      display: inline-block;
      width: 36px;
      height: 20px;
      background: #ccc;
      border-radius: 16px;
      position: relative;
      transition: background 0.2s;
      vertical-align: middle;
      cursor: pointer;
    }
    .switch-row input[type="checkbox"]:checked + .switch-slider {
      background: #434447;
    }
    .switch-slider::after {
      content: '';
      position: absolute;
      left: 2px;
      top: 2px;
      width: 16px;
      height: 16px;
      background: #fff;
      border-radius: 50%;
      transition: left 0.2s;
    }
    .switch-row input[type="checkbox"]:checked + .switch-slider::after {
      left: 18px;
    }
    .switch-row input[type="checkbox"] {
      opacity: 0;
      width: 0;
      height: 0;
      position: absolute;
      left: -9999px;
    }
    .switch-label {
      min-width: 90px;
      color: #222;
      font-size: 0.99em;
      user-select: none;
    }
    /* File Buttons */
    .file-btn {
      width: 85%;
      margin: 4px 0 12px 0;
      background: var(--hover);
      color: #333;
      font-weight: 500;
      font-size: 15px;
      border-radius: 8px;
      padding: 10px 0;
      border: none;
      box-shadow: 0 1px 4px #0001;
      transition: background 0.14s, color 0.14s;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    .file-btn:hover {
      background: #434447;
      color: #fff;
    }
    .file-input-label {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 1em;
      margin-bottom: 2px;
      margin-top: 5px;
      color: #202020;
      font-weight: 500;
    }
    /* Скрытые инпуты */
    input[type=file] {
      display: none;
    }
    @media (max-width: 1400px) {
      .main-layout { flex-direction: column; align-items: center; gap: 20px; }
      .upload-block, .left-block, .right-block { width: 98vw; min-width: unset; max-width: 99vw;}
      #canvasBox { margin-left: auto; margin-right: auto; }
    }
	.volume-row {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  transition: background 0.15s;
  border-radius: 7px;
  padding: 3px 9px 3px 0;
}
.volume-row:focus-within,
.volume-row:hover {
  background: var(--hover);
  box-shadow: 0 2px 10px #0001;
}
.volume-row .slider-icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
  color: #bababa;
  transition: color 0.22s, transform 0.18s;
  pointer-events: none;
}
.volume-row:focus-within .slider-icon,
.volume-row:hover .slider-icon {
  color: var(--primary);
  transform: rotate(-12deg) scale(1.13);
}
.volume-row .slider-label {
  flex: 1.2;
  font-size: 1em;
  color: #181818;
  font-weight: 400;
}
.volume-row .slider {
  flex: 2.2;
  accent-color: var(--primary);
  background: #e1e1e1;
  border-radius: 5px;
  height: 2px;
  transition: accent-color 0.18s;
}
.volume-row .slider:focus {
  accent-color: #111;
}
.volume-row .slider-val {
  width: 54px;
  text-align: right;
  font-size: 15px;
  color: #888;
  flex-shrink: 0;
  transition: color 0.2s;
}
.volume-row:focus-within .slider-val,
.volume-row:hover .slider-val {
  color: var(--primary);
}
.download-block {
  margin-top: 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
#downloadBtn {
  width: 100%;
  padding: 13px 0 12px 0;
  font-size: 1.09em;
  border-radius: 11px;
  background: #434447;
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 2px 12px #0001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

}
#progressBarWrap {
  width: 100%;
  background: #e4e4e4;
  border-radius: 7px;
  margin: 14px 0 0 0;
  display: none;
  height: 14px;
  box-shadow: 0 1px 5px #0001;
  overflow: hidden;
}
#progressBar {
  width: 0%;
  height: 14px;
  background: #434447;
  border-radius: 7px;
  transition: width 0.22s;
}
.aspect-checkbox-row {
  width: 360px;
  margin: 22px auto 0 auto;
  display: flex;
  justify-content: center;
}
.aspect-checkbox-label {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 28px;
  border-radius: 15px;
  background: #f7fafd;
  font-size: 1.13em;
  font-weight: 600;
  color: #202834;
  box-shadow: 0 2px 14px #0001;
  cursor: pointer;
  user-select: none;
  border: 2px solid #e3e8f4;
  transition: border 0.14s, background 0.18s;
}
.aspect-checkbox {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 2.5px solid #b6bfc7;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border 0.15s, box-shadow 0.14s;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aspect-checkbox:checked {
  border: 2.5px solid #19bc6b;
  background: #f4fff6;
  box-shadow: 0 0 0 2px #8af9c0a1;
}
.aspect-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 8px; top: 4px;
  width: 7px; height: 14px;
  border: solid #19bc6b;
  border-width: 0 4px 4px 0;
  border-radius: 2px;
  transform: rotate(43deg);
  transition: border-color 0.17s;
}
.aspect-checkbox-label .lock {
  font-size: 1.3em;
  color: #ea5555;
  transition: color 0.18s;
  margin-left: 2px;
}
.aspect-checkbox:checked ~ .lock {
  color: #19bc6b;
}
.aspect-checkbox-label .label-txt {
  margin-left: 0;
  transition: color 0.15s;
  font-weight: 600;
  font-size: 1.00em;
}
.aspect-checkbox-row {
  width: 360px;
  margin: 20px auto 0 auto;
  display: flex;
  justify-content: center;
}
.aspect-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border-radius: 9px;
  background: #f7f8fa;
  font-size: 1em;
  font-weight: 500;
  color: #25282b;
  cursor: pointer;
  user-select: none;
  border: none;
  transition: background 0.13s;
}
.aspect-checkbox-label:hover {
  background: #eceff3;
}
.aspect-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #bfc5cc;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: border 0.12s;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.aspect-checkbox:checked {
  border: 2px solid #19bc6b;
  background: #f6fcf8;
}
.aspect-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 2.5px;
  width: 5px; height: 10px;
  border: solid #19bc6b;
  border-width: 0 2.5px 2.5px 0;
  border-radius: 1.5px;
  transform: rotate(45deg);
}
.aspect-checkbox-label .lock {
  font-size: 1em;
  color: #b6bfc7;
  transition: color 0.15s;
}
.aspect-checkbox:checked ~ .lock {
  color: #19bc6b;
}
.remove-btn {
width: 70%;
    margin-top: 3px;
    font-size: 15px;
    border-radius: 8px;
    padding: 9px 0;
    border: none;
    box-shadow: 0 1px 4px #0001;
    display: flex
;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    background: #ffeded;
    color: #000000;
    transition: background 0.14s, color 0.14s;
}

.remove-btn:hover {
  background: #ea5555;
  color: #fff;
}
