/* Styles Tailwind utilities don't cover well: background glow, range inputs,
   pixel-box masks and the fullscreen player. */

.app-bg {
  background:
    radial-gradient(60rem 40rem at 72% -10%, rgb(30 110 190 / 0.22), transparent 65%),
    radial-gradient(50rem 35rem at 110% 110%, rgb(20 90 170 / 0.18), transparent 60%),
    radial-gradient(40rem 30rem at -10% 40%, rgb(20 70 140 / 0.12), transparent 60%),
    #050c18;
}

.preview-bg {
  background:
    radial-gradient(ellipse at 50% 35%, rgb(24 70 120 / 0.45), transparent 70%),
    #060f1c;
}

/* Match Tailwind's layer order so utilities (e.g. h-11, size-10) can override these components. */
@layer theme, base, components, utilities;

/* ---------- Components ---------- */
@layer components {
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3fbef7;
}
.step-title {
  margin-top: 6px;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}
.step-copy {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: #cbd5e1;
}

.card {
  border-radius: 1rem;
  border: 1px solid rgb(255 255 255 / 0.07);
  background-color: rgb(10 23 40 / 0.6);
}

.btn-primary,
.btn-outline,
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  transition: filter 0.15s, background-color 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn-primary:focus-visible,
.btn-outline:focus-visible,
.btn-icon:focus-visible {
  outline: 2px solid #6fd4ff;
  outline-offset: 2px;
}
.btn-primary:disabled,
.btn-outline:disabled,
.btn-icon:disabled { cursor: not-allowed; }

.btn-primary {
  width: 100%;
  height: 48px;
  border-radius: 0.75rem;
  font-size: 15px;
  color: #040b16;
  background-image: linear-gradient(to right, #6fd4ff, #3fbef7);
  box-shadow: 0 10px 24px -8px rgb(63 190 247 / 0.45);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.55; }
.btn-primary.btn-muted-disabled:disabled {
  opacity: 1;
  color: #94a3b8;
  background-image: none;
  background-color: rgb(71 85 105 / 0.45);
  box-shadow: none;
}

.btn-outline {
  height: 44px;
  border-radius: 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  background-color: rgb(255 255 255 / 0.02);
  font-size: 15px;
  color: #e2e8f0;
}
.btn-outline:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 0.2);
  background-color: rgb(255 255 255 / 0.06);
}
.btn-outline:disabled { opacity: 0.45; }

.btn-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  color: #fff;
}
.btn-icon:hover:not(:disabled) { background-color: rgb(255 255 255 / 0.1); }
.btn-icon:disabled { opacity: 0.4; }

kbd {
  display: inline-flex;
  min-width: 24px;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgb(255 255 255 / 0.15);
  background-color: rgb(255 255 255 / 0.06);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
}

}

/* ---------- Range slider ---------- */
.range {
  --p: 0%;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #3fbef7 var(--p), rgb(255 255 255 / 0.14) var(--p));
  cursor: pointer;
  outline: none;
}
.range:disabled { cursor: default; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #3fbef7;
  box-shadow: 0 0 0 4px rgb(63 190 247 / 0.2);
}
.range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #3fbef7;
  box-shadow: 0 0 0 4px rgb(63 190 247 / 0.2);
}
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgb(63 190 247 / 0.45); }

/* ---------- Pixel box masks ---------- */
.mask {
  --track: #3fbef7;
  position: absolute;
  border: 2px solid rgb(255 255 255 / 0.75);
  border-radius: 6px;
  cursor: move;
  touch-action: none;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);
}
.mask[data-mode="draft"] {
  border-style: dashed;
  background: rgb(255 255 255 / 0.06);
}
.mask.is-selected {
  border-color: var(--track);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--track) 30%, transparent);
}
.mask[data-mode="recording"] {
  border-color: #f43f5e;
  border-style: solid;
  box-shadow: 0 0 0 3px rgb(244 63 94 / 0.35);
}

.mask-tag {
  position: absolute;
  left: -2px;
  bottom: 100%;
  margin-bottom: 5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--track);
  color: #040b16;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}
.mask:not(.is-selected) .mask-tag { background: rgb(255 255 255 / 0.85); }
.mask[data-mode="recording"] .mask-tag { background: #f43f5e; color: #fff; }
.mask.tag-inside .mask-tag { bottom: auto; top: 4px; left: 4px; margin: 0; }

.mask .handle {
  position: absolute;
  display: none;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 2px solid var(--track);
  border-radius: 3px;
}
.mask.is-selected .handle { display: block; }
.mask[data-mode="recording"] .handle { border-color: #f43f5e; }
.handle[data-handle="nw"] { left: -7px;  top: -7px;    cursor: nwse-resize; }
.handle[data-handle="n"]  { left: calc(50% - 6px); top: -7px; cursor: ns-resize; }
.handle[data-handle="ne"] { right: -7px; top: -7px;    cursor: nesw-resize; }
.handle[data-handle="e"]  { right: -7px; top: calc(50% - 6px); cursor: ew-resize; }
.handle[data-handle="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.handle[data-handle="s"]  { left: calc(50% - 6px); bottom: -7px; cursor: ns-resize; }
.handle[data-handle="sw"] { left: -7px;  bottom: -7px; cursor: nesw-resize; }
.handle[data-handle="w"]  { left: -7px;  top: calc(50% - 6px); cursor: ew-resize; }

/* ---------- Fullscreen player ---------- */
#player:fullscreen {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #040b16;
}
#player:fullscreen #viewportFrame {
  flex: 1;
  height: auto;
}

/* ---------- Timeline ---------- */
.tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 6px;
  background: rgb(255 255 255 / 0.18);
}
.tick.major {
  height: 11px;
  background: rgb(255 255 255 / 0.35);
}
