:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: #050505;
  color: #f4f4f4;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* App Shell Layout */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #050505;
  color: #f4f4f4;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  .app-shell {
    height: 100vh;
    overflow: hidden;
  }
}

/* Top Bar */
.topbar {
  height: 56px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(24, 24, 24, 0.9);
  background-color: #080808;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f4f4f4;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Main Workspace Split */
.workspace-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .workspace-body {
    flex-direction: row;
  }
}

/* Sidebar */
.sidebar {
  width: 100%;
  flex-shrink: 0;
  background-color: #090909;
  border-bottom: 1px solid rgba(24, 24, 24, 0.9);
  display: flex;
  flex-direction: column;
  max-height: 55vh;
}

@media (min-width: 1024px) {
  .sidebar {
    width: 360px;
    border-bottom: 0;
    border-right: 1px solid rgba(24, 24, 24, 0.9);
    max-height: none;
    height: 100%;
  }
}

.sidebar-tabs-wrap {
  padding: 12px;
  border-bottom: 1px solid rgba(24, 24, 24, 0.8);
  flex-shrink: 0;
}

.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background-color: #050505;
  border: 1px solid rgba(24, 24, 24, 0.8);
  border-radius: 6px;
}

.tab-btn {
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #a1a1a1;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tab-btn:hover {
  color: #e7e7e7;
}

.tab-btn.is-active {
  background-color: #181818;
  color: #c3c3c3;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(24, 24, 24, 0.8);
  background-color: #070707;
  flex-shrink: 0;
}

/* Custom Scrollbar */
.studio-scroll::-webkit-scrollbar {
  width: 6px;
}

.studio-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.studio-scroll::-webkit-scrollbar-thumb {
  background: #181818;
  border-radius: 3px;
}

.studio-scroll::-webkit-scrollbar-thumb:hover {
  background: #272727;
}

/* Sections & Helpers */
.section-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-stack-xs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.divider-top {
  padding-top: 12px;
  border-top: 1px solid rgba(24, 24, 24, 0.8);
}

.divider-top-soft {
  padding-top: 8px;
  border-top: 1px solid rgba(24, 24, 24, 0.7);
}

.label-main {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #d3d3d3;
}

.label-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #a1a1a1;
}

.group-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #727272;
  font-weight: 600;
}

.group-subtitle-cyan {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(161, 161, 161, 0.9);
  font-weight: 600;
}

.hint-text {
  margin: 0;
  font-size: 11px;
  color: #727272;
  line-height: 1.4;
}

.desc-text {
  margin: 0;
  font-size: 11px;
  color: #a1a1a1;
  line-height: 1.4;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.text-xs {
  font-size: 12px;
}

.text-11 {
  font-size: 11px;
}

.text-10 {
  font-size: 10px;
}

.text-cyan {
  color: #c3c3c3;
}

.text-cyan-bright {
  color: #a1a1a1;
}

.text-emerald {
  color: #9d9d9d;
}

.text-amber {
  color: #d0d0d0;
}

.text-rose {
  color: #c0c0c0;
}

.text-slate-200 {
  color: #e7e7e7;
}

.text-slate-300 {
  color: #d3d3d3;
}

.text-slate-400 {
  color: #a1a1a1;
}

.text-slate-500 {
  color: #727272;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.grid-2-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.grid-3-gap6 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

/* Cards & Boxes */
.bio-card {
  padding: 10px;
  background-color: #070707;
  border: 1px solid rgba(24, 24, 24, 0.9);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-card {
  padding: 10px;
  background-color: #080808;
  border: 1px solid rgba(24, 24, 24, 0.9);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-box {
  padding: 10px;
  background-color: #060606;
  border: 1px solid rgba(24, 24, 24, 0.8);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a1a1a1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-box-title {
  font-family: var(--font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #727272;
  font-weight: 600;
}

.loop-box {
  padding: 12px;
  background-color: #080808;
  border: 1px solid rgba(24, 24, 24, 0.9);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Buttons */
.btn-primary-cyan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #040404;
  background-color: #a1a1a1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.btn-primary-cyan:hover {
  background-color: #c3c3c3;
}

.btn-play-sm {
  padding: 6px 12px;
  font-weight: 500;
  border-radius: 4px;
}

.btn-block-cyan {
  width: 100%;
  padding: 8px 16px;
  border-radius: 4px;
}

.btn-stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #d3d3d3;
  background-color: #0d0d0d;
  border: 1px solid #181818;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn-stage:hover:not(:disabled) {
  border-color: #535353;
  color: #f4f4f4;
}

.btn-stage:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn-stage.is-active {
  background-color: rgba(133, 133, 133, 0.2);
  border-color: #a1a1a1;
  color: #dddddd;
}

.btn-sidebar-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #e7e7e7;
  background-color: #0c0c0c;
  border: 1px solid #272727;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.btn-sidebar-action:hover {
  border-color: rgba(161, 161, 161, 0.7);
  color: #fafafa;
}

.btn-sidebar-action.is-active {
  background-color: rgba(133, 133, 133, 0.2);
  border-color: #a1a1a1;
  color: #dddddd;
}

.btn-footer-reset {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #d3d3d3;
  background-color: #0c0c0c;
  border: 1px solid #181818;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-footer-reset:hover {
  border-color: #535353;
  color: #f4f4f4;
}

.preset-btn {
  text-align: left;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #181818;
  background-color: #0c0c0c;
  color: #d3d3d3;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.preset-btn:hover {
  border-color: #272727;
}

.preset-btn.is-active {
  background-color: rgba(24, 24, 24, 0.45);
  border-color: rgba(133, 133, 133, 0.75);
  color: #dddddd;
}

.preset-btn-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-btn {
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid #181818;
  background-color: #0c0c0c;
  color: #d3d3d3;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.chip-btn:hover {
  border-color: #272727;
}

.chip-btn.is-active {
  background-color: rgba(24, 24, 24, 0.45);
  border-color: rgba(133, 133, 133, 0.75);
  color: #dddddd;
}

.chip-btn-mono {
  font-family: var(--font-mono);
}

.mode-card-btn {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #181818;
  background-color: #0c0c0c;
  color: #d3d3d3;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.mode-card-btn:hover {
  border-color: #272727;
}

.mode-card-btn.is-active {
  background-color: rgba(24, 24, 24, 0.45);
  border-color: rgba(133, 133, 133, 0.75);
  color: #dddddd;
}

.mode-card-title {
  font-size: 12px;
  font-weight: 500;
}

.mode-card-desc {
  font-size: 11px;
  color: #a1a1a1;
  margin-top: 2px;
}

.palette-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background-color: #0c0c0c;
  border: 1px solid #181818;
  border-radius: 4px;
  font-size: 12px;
  color: #e7e7e7;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.palette-btn:hover {
  border-color: #535353;
}

.palette-swatch {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid #272727;
  flex-shrink: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inputs & Selects */
.studio-select {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  background-color: #0c0c0c;
  border: 1px solid #181818;
  border-radius: 4px;
  color: #e7e7e7;
  outline: none;
}

.studio-select:focus {
  border-color: #858585;
}

.studio-number {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  background-color: #0c0c0c;
  border: 1px solid #181818;
  border-radius: 4px;
  color: #e7e7e7;
  outline: none;
}

.studio-number:focus {
  border-color: #858585;
}

.studio-number-sm {
  width: 76px;
  padding: 4px 8px;
  text-align: right;
  color: #c3c3c3;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #a1a1a1;
  cursor: pointer;
  user-select: none;
}

.checkbox-label-sm {
  font-size: 11px;
  color: #d3d3d3;
  gap: 6px;
}

.checkbox-input {
  width: 14px;
  height: 14px;
  accent-color: #a1a1a1;
  cursor: pointer;
  margin: 0;
}

.color-input {
  width: 100%;
  height: 32px;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  border: 1px solid #272727;
  cursor: pointer;
}

.seed-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #c3c3c3;
  background-color: #0c0c0c;
  border: 1px solid #181818;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}

.seed-btn:hover {
  border-color: rgba(133, 133, 133, 0.6);
}

/* Precision Slider Control */
.slider-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.slider-label {
  color: #d3d3d3;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slider-value-btn {
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e7e7e7;
  cursor: text;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.slider-value-btn:hover {
  color: #a1a1a1;
}

.slider-unit {
  color: #727272;
  margin-left: 2px;
}

.slider-inline-edit {
  width: 80px;
  padding: 2px 6px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  background-color: #0e0e0e;
  border: 1px solid #858585;
  border-radius: 4px;
  color: #f4f4f4;
  outline: none;
}

input[type="range"].studio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #181818;
  outline: none;
  cursor: pointer;
  margin: 4px 0;
}

input[type="range"].studio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #a1a1a1;
  border: 2px solid #050505;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.12s ease;
}

input[type="range"].studio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #c3c3c3;
}

input[type="range"].studio-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #a1a1a1;
  border: 2px solid #050505;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.12s ease;
}

/* Image Slots & Dropzone */
.dropzone {
  padding: 12px;
  border: 1px dashed #272727;
  border-radius: 4px;
  background-color: #0c0c0c;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone:hover {
  border-color: #727272;
}

.dropzone.is-dragging {
  border-color: #a1a1a1;
  background-color: rgba(24, 24, 24, 0.25);
}

.preview-box {
  background-color: #000000;
  border: 1px solid #181818;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-box img {
  width: 100%;
  max-height: 96px;
  object-fit: contain;
  display: block;
}

.slot-link-btn {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.slot-link-cyan {
  color: #a1a1a1;
}

.slot-link-cyan:hover {
  color: #c3c3c3;
}

.slot-link-rose {
  color: #9d9d9d;
}

.slot-link-rose:hover {
  color: #c0c0c0;
}

.template-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 11px;
  color: #d3d3d3;
  background-color: #0c0c0c;
  border: 1px solid #181818;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.template-btn:hover {
  border-color: #535353;
}

/* Playback Ribbon & Stage */
.stage-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #050505;
  overflow: hidden;
}

.stage-ribbon {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(24, 24, 24, 0.8);
  background-color: #080808;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.stage-controls-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.speed-pill-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background-color: #050505;
  border: 1px solid #181818;
  border-radius: 4px;
  margin-left: 4px;
}

.speed-pill-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  border-radius: 3px;
  color: #a1a1a1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.speed-pill-btn:hover {
  color: #e7e7e7;
}

.speed-pill-btn.is-active {
  background-color: #181818;
  color: #c3c3c3;
  font-weight: 500;
}

.stage-telemetry-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.telemetry-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: #a1a1a1;
}

.progress-track {
  height: 2px;
  width: 100%;
  background-color: #0e0e0e;
  flex-shrink: 0;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background-color: #a1a1a1;
  transition: width 0.15s ease, background-color 0.15s ease;
}

.progress-fill.is-complete {
  background-color: #9d9d9d;
}

.progress-fill.is-dying {
  background-color: #bfbfbf;
}

.canvas-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
}

@media (min-width: 640px) {
  .canvas-stage {
    padding: 24px;
  }
}

.sim-canvas {
  border: 1px solid #181818;
  background-color: #000000;
  display: block;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

.sim-canvas.is-brush-cursor {
  cursor: crosshair;
}

.webgl-error-box {
  max-width: 440px;
  padding: 20px;
  background-color: #0a0a0a;
  border: 1px solid rgba(40, 40, 40, 0.7);
  border-radius: 6px;
  font-size: 14px;
  color: #dcdcdc;
}

/* Toggle Switch Bar */
.segmented-sm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background-color: #050505;
  border: 1px solid #181818;
  border-radius: 6px;
}

.seg-btn {
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #a1a1a1;
  cursor: pointer;
}

.seg-btn:hover {
  color: #e7e7e7;
}

.seg-btn.is-active {
  background-color: #181818;
  color: #c3c3c3;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.76);
  padding: 16px;
}

.modal-dialog {
  width: 100%;
  max-width: 576px;
  background-color: #0a0a0a;
  border: 1px solid #181818;
  border-radius: 8px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #181818;
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #f4f4f4;
}

.modal-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #a1a1a1;
  font-family: var(--font-mono);
}

.modal-close-btn {
  padding: 6px;
  background: transparent;
  border: none;
  color: #a1a1a1;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: #f4f4f4;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quality-btn {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #181818;
  background-color: #0e0e0e;
  color: #d3d3d3;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.quality-btn:hover {
  border-color: #272727;
}

.quality-btn.is-active {
  background-color: #a1a1a1;
  border-color: #a1a1a1;
  color: #040404;
}

.quality-btn-title {
  font-size: 12px;
  font-weight: 600;
}

.quality-btn-sub {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #a1a1a1;
}

.quality-btn.is-active .quality-btn-sub {
  color: #0e0e0e;
}

.modal-seg-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background-color: #0e0e0e;
  border: 1px solid #181818;
  border-radius: 6px;
}

.modal-seg-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background-color: #0e0e0e;
  border: 1px solid #181818;
  border-radius: 6px;
}

.modal-seg-btn {
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #a1a1a1;
  cursor: pointer;
}

.modal-seg-btn:hover {
  color: #f4f4f4;
}

.modal-seg-btn.is-active {
  background-color: #a1a1a1;
  color: #040404;
}

.modal-error {
  padding: 12px;
  font-size: 12px;
  color: #c0c0c0;
  background-color: rgba(17, 17, 17, 0.5);
  border: 1px solid rgba(40, 40, 40, 0.7);
  border-radius: 6px;
}

.modal-info-note {
  padding: 10px 12px;
  font-size: 11px;
  color: #dddddd;
  background-color: rgba(24, 24, 24, 0.45);
  border: 1px solid rgba(133, 133, 133, 0.4);
  border-radius: 6px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #181818;
}

.btn-ghost {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #d3d3d3;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-ghost:hover {
  color: #f4f4f4;
}

.btn-danger-outline {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #c0c0c0;
  background: transparent;
  border: 1px solid rgba(40, 40, 40, 0.8);
  border-radius: 6px;
  cursor: pointer;
}

.btn-danger-outline:hover {
  background-color: rgba(17, 17, 17, 0.4);
}

.modal-progress-bar {
  width: 100%;
  height: 8px;
  background-color: #0e0e0e;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #181818;
}

.modal-progress-fill {
  height: 100%;
  width: 0%;
  background-color: #a1a1a1;
  transition: width 0.15s ease;
}

.video-preview-wrap {
  background-color: #000000;
  border: 1px solid #181818;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-preview-wrap video {
  max-height: 288px;
  width: auto;
  display: block;
}

.svg-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.svg-icon-sm {
  width: 12px;
  height: 12px;
}

.svg-icon-lg {
  width: 16px;
  height: 16px;
}

.png-label-desktop {
  display: none;
}

@media (min-width: 768px) {
  .png-label-desktop {
    display: inline;
  }
}

.toolbar-slider {
  width: 190px;
  margin-left: 6px;
  padding: 2px 8px;
  background-color: #050505;
  border: 1px solid #181818;
  border-radius: 4px;
}

/* Layout 3 colunas: presets | simulacao | ajustes */
.sidebar-left { border-right: 1px solid rgba(24, 24, 24, 0.9); }
.sidebar-right { border-right: 0; border-left: 1px solid rgba(24, 24, 24, 0.9); }
@media (min-width: 1024px) {
  .sidebar-left { width: 310px; }
  .sidebar-right { width: 350px; border-right: 0; }
}
