:root {
  --tahe-generation-purple: #9c5ef6;
  --tahe-generation-purple-light: #c8b5ff;
  --tahe-generation-blue-light: #9edbff;
  --tahe-generation-rose-light: #ff86aa;
}

html body [data-tahe-generation-frame] {
  position: relative !important;
  width: 100% !important;
  height: 176px !important;
  min-height: 176px !important;
  max-height: 176px !important;
  overflow: hidden !important;
  border: 1px dashed #4b5563 !important;
  border-radius: 12px !important;
  background: #181819 !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

html body [data-tahe-generation-frame="video"] video {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
  background: #121216 !important;
}

html body [data-tahe-generation-frame] .el-image,
html body [data-tahe-generation-frame] .el-image__inner {
  width: 100% !important;
  height: 100% !important;
}

html body [data-tahe-generation-frame] .el-image {
  cursor: zoom-in !important;
}

.tahe-generation-video-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #6b7280;
}

.tahe-generation-video-empty__icon {
  position: relative;
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.tahe-generation-video-empty__icon::before {
  position: absolute;
  top: 7px;
  left: 10px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
  content: "";
}

.tahe-generation-video-empty__text {
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0px;
}

.tahe-generation-progress {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  border-radius: inherit;
  background: #121216;
  pointer-events: none;
}

.tahe-generation-progress__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tahe-generation-progress__veil {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 10, 0.12);
}

.tahe-generation-progress__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tahe-generation-progress__percent,
.tahe-generation-progress__failure {
  color: #fff;
  font-size: 16px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0px;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.tahe-generation-progress__failure {
  display: none;
  width: calc(100% - 24px);
}

.tahe-generation-progress__stage {
  margin-top: 4px;
  color: rgba(239, 239, 243, 0.76);
  font-size: 11px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9);
}

.tahe-generation-progress__footer {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tahe-generation-progress__track {
  position: relative;
  flex: 1;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.17);
}

.tahe-generation-progress__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(
    90deg,
    #7652e7 0%,
    var(--tahe-generation-purple) 58%,
    var(--tahe-generation-purple-light) 100%
  );
  transition: width 420ms ease-out;
}

.tahe-generation-progress__live {
  flex: 0 0 auto;
  color: rgba(229, 228, 235, 0.58);
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: 0px;
}

.tahe-generation-progress[data-state="failed"] {
  background: #181819;
}

.tahe-generation-progress[data-state="failed"] .tahe-generation-progress__canvas,
.tahe-generation-progress[data-state="failed"] .tahe-generation-progress__veil,
.tahe-generation-progress[data-state="failed"] .tahe-generation-progress__percent,
.tahe-generation-progress[data-state="failed"] .tahe-generation-progress__stage,
.tahe-generation-progress[data-state="failed"] .tahe-generation-progress__footer {
  display: none;
}

.tahe-generation-progress[data-state="failed"] .tahe-generation-progress__failure {
  display: block;
}

.tahe-generation-video-fullscreen {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 12;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(10, 10, 12, 0.7);
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, background-color 160ms ease;
}

[data-tahe-generation-frame="video"]:hover .tahe-generation-video-fullscreen,
.tahe-generation-video-fullscreen:focus-visible {
  opacity: 1;
}

.tahe-generation-video-fullscreen:hover {
  background: rgba(28, 28, 32, 0.92);
}

@media (prefers-reduced-motion: reduce) {
  .tahe-generation-progress__bar,
  .tahe-generation-video-fullscreen {
    transition: none;
  }
}
