:root {
  --vc-accent: var(--app-accent);
  --vc-accent-strong: var(--app-accent-strong);
  --vc-text: var(--app-text);
  --vc-sub: var(--app-muted);
  --vc-line: var(--app-line-subtle);
  --vc-card: var(--app-glass);
  --vc-card-strong: var(--app-glass-strong);
}

#main_bg {
  background-image: url(../assets/images/background/pbr_bg.webp);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  position: fixed;
  min-height: 100vh;
  width: 100%;
  z-index: -1;
}

#panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(245, 252, 249, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
}

.vc-app {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--vc-text);
  font-family: var(--app-font-serif);
}

.vc-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(234, 248, 242, 0.78));
  border: 1px solid var(--vc-line);
  box-shadow: 0 8px 16px rgba(24, 91, 73, 0.08);
  backdrop-filter: blur(6px);
}

.vc-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.vc-title h1 {
  margin: 0;
  color: var(--vc-text);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 700;
}

.vc-status {
  min-width: 0;
  color: var(--vc-sub);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vc-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-surface-input);
  color: var(--app-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.vc-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--app-line-strong);
  transform: translateY(-1px);
}

.vc-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.vc-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--vc-accent), var(--vc-accent-strong));
  box-shadow: 0 4px 12px rgba(35, 126, 102, 0.26);
}

.vc-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--app-accent-light), var(--app-accent-strong));
  box-shadow: 0 6px 14px rgba(26, 112, 90, 0.32);
}

.vc-danger {
  color: var(--app-error);
  border-color: rgba(157, 51, 66, 0.22);
  background: rgba(255, 247, 248, 0.92);
}

.vc-danger:hover:not(:disabled) {
  border-color: rgba(157, 51, 66, 0.38);
}

.vc-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(280px, 0.8fr) minmax(300px, 0.85fr);
  gap: 12px;
  overflow: hidden;
}

.vc-preview-pane,
.vc-settings-pane,
.vc-output-pane {
  min-width: 0;
  min-height: 0;
}

.vc-preview-pane {
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto;
  gap: 10px;
  overflow: hidden;
}

.vc-dropzone {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed var(--app-line-strong);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(234, 248, 242, 0.72));
  box-shadow: 0 8px 16px rgba(24, 91, 73, 0.08);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.vc-dropzone:hover,
.vc-dropzone.is-dragover {
  border-color: var(--app-line-strong);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(227, 246, 239, 0.84));
  box-shadow: 0 10px 20px rgba(24, 91, 73, 0.12);
}

.vc-empty {
  width: min(430px, calc(100% - 40px));
  text-align: center;
  color: var(--vc-sub);
  pointer-events: none;
}

.vc-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--vc-text);
  font-size: 18px;
}

.vc-empty span {
  display: block;
  line-height: 1.7;
  font-size: 13px;
}

.vc-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--app-overlay-dark);
  border-radius: 10px;
}

.vc-timeline,
.vc-pane {
  background: var(--vc-card);
  border: 1px solid var(--vc-line);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(24, 91, 73, 0.08);
  backdrop-filter: blur(6px);
}

.vc-timeline {
  flex-shrink: 0;
  padding: 12px 14px 14px;
}

.vc-timebar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--app-accent-strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.vc-timebar span:nth-child(2) {
  text-align: center;
  color: var(--vc-sub);
}

.vc-range {
  display: grid;
  gap: 8px;
}

.vc-range input[type="range"] {
  width: 100%;
  accent-color: var(--vc-accent);
}

.vc-pane {
  overflow-y: auto;
  padding: 14px;
}

.vc-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--app-line-subtle);
}

.vc-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.vc-section h2 {
  margin: 0 0 12px;
  color: var(--vc-text);
  font-size: 15px;
  font-weight: 700;
}

.vc-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.vc-field label {
  color: var(--vc-text);
  font-size: 13px;
}

.vc-field input,
.vc-field select {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--app-text);
  background: var(--app-surface-input);
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vc-field input:focus,
.vc-field select:focus {
  outline: none;
  border-color: var(--app-line-strong);
  box-shadow: 0 0 0 3px var(--app-accent-hover);
}

.vc-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vc-meta {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  color: var(--vc-sub);
  font-size: 12px;
  line-height: 1.5;
}

.vc-meta b {
  color: var(--app-accent-strong);
  font-weight: 700;
}

.vc-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.vc-log {
  min-height: 168px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--app-text-inverse);
  background: var(--app-overlay-dark);
  border: 1px solid var(--app-line-subtle);
  font-size: 12px;
  line-height: 1.6;
}

.vc-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--app-accent-hover);
  margin-bottom: 10px;
}

.vc-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vc-accent), var(--app-accent-light));
  transition: width 0.2s ease;
}

.vc-result {
  display: grid;
  gap: 12px;
}

.vc-result video,
.vc-result img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--app-overlay-dark);
}

.vc-download {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--vc-accent), var(--vc-accent-strong));
  box-shadow: 0 4px 12px rgba(35, 126, 102, 0.24);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.vc-note {
  margin: 0;
  color: var(--vc-sub);
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 1200px) {
  .vc-layout {
    grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.9fr);
  }

  .vc-output-pane {
    grid-column: 1 / -1;
    min-height: 210px;
  }
}

@media (max-width: 760px) {
  #panel {
    overflow-y: auto;
  }

  .vc-app {
    height: auto;
  }

  .vc-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .vc-title {
    width: 100%;
    flex-direction: column;
    gap: 4px;
  }

  .vc-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .vc-actions .vc-btn {
    width: 100%;
  }

  .vc-layout {
    display: block;
    overflow: visible;
  }

  .vc-preview-pane,
  .vc-pane {
    margin-bottom: 12px;
  }

  .vc-dropzone {
    min-height: 220px;
  }
}
