.dg-player-root {
  position: relative;
  width: 100%;
  height: 100%;
  background: #1c1c19;
  border-radius: 10px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.dg-player-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

.dg-player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 160ms ease;
}

/* A captured field recreated over its pre-edit screenshot. The outer layer
   only adds focus/border chrome; the inner content patch covers the old text,
   leaving captured icons and decoration around it untouched. */
.dg-player-typing-after {
  z-index: 1;
  pointer-events: none;
}

.dg-player-typing {
  position: absolute;
  box-sizing: border-box;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
  margin: 0;
  text-decoration: none;
}

.dg-player-typing-content {
  box-sizing: border-box;
  display: flex;
  min-width: 0;
  overflow: hidden;
}

.dg-player-typing-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dg-player-typing-selection {
  color: #ffffff;
  background: #2f6fed;
  border-radius: 2px;
}

.dg-player-typing-caret {
  display: inline-block;
  flex: 0 0 0;
  align-self: center;
  width: 0;
  height: 1.05em;
  border-left: max(1px, 0.08em) solid currentColor;
  margin-inline-start: 1px;
  animation: dg-typing-caret 820ms step-end infinite;
}

@keyframes dg-typing-caret {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

/* The scene holds the picture plus the overlays that must scale with it, so
   the zoom effect is a single transform and overlays stay aligned for free. */
.dg-player-scene {
  position: absolute;
  inset: 0;
  transform: scale(1);
  transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* Rectangle only -- dimming is the separate spotlight effect. */
.dg-player-highlight {
  position: absolute;
  border: 2px solid var(--dg-hl, #5b8cff);
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
  pointer-events: none;
  transition:
    left 300ms ease,
    top 300ms ease,
    width 300ms ease,
    height 300ms ease;
}

.dg-player-highlight.dg-player-target-action {
  pointer-events: auto;
  cursor: pointer;
}

/* Editor only: the box becomes interactive with grab handles. */
.dg-player-highlight.dg-editable {
  pointer-events: auto;
  cursor: move;
}

.dg-player-highlight.dg-dragging {
  /* Kill the easing while dragging or the box lags the pointer. */
  transition: none;
}

.dg-player-mask {
  position: absolute;
  pointer-events: none;
  border-radius: 3px;
}

.dg-player-mask[data-style="solid"] {
  background: #0f141b;
}

.dg-player-mask[data-style="blur"] {
  backdrop-filter: blur(14px);
  background: rgba(15, 20, 27, 0.15);
}

.dg-player-mask.dg-editable {
  pointer-events: auto;
  cursor: move;
  outline: 2px dashed rgba(255, 255, 255, 0.7);
  outline-offset: -2px;
}

.dg-hl-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid var(--dg-hl, #5b8cff);
  border-radius: 2px;
  pointer-events: auto;
}

.dg-hl-handle[data-h="nw"] {
  top: -6px;
  left: -6px;
  cursor: nwse-resize;
}
.dg-hl-handle[data-h="n"] {
  top: -6px;
  left: 50%;
  margin-left: -5px;
  cursor: ns-resize;
}
.dg-hl-handle[data-h="ne"] {
  top: -6px;
  right: -6px;
  cursor: nesw-resize;
}
.dg-hl-handle[data-h="e"] {
  top: 50%;
  right: -6px;
  margin-top: -5px;
  cursor: ew-resize;
}
.dg-hl-handle[data-h="se"] {
  bottom: -6px;
  right: -6px;
  cursor: nwse-resize;
}
.dg-hl-handle[data-h="s"] {
  bottom: -6px;
  left: 50%;
  margin-left: -5px;
  cursor: ns-resize;
}
.dg-hl-handle[data-h="sw"] {
  bottom: -6px;
  left: -6px;
  cursor: nesw-resize;
}
.dg-hl-handle[data-h="w"] {
  top: 50%;
  left: -6px;
  margin-top: -5px;
  cursor: ew-resize;
}

.dg-player-highlight.dg-spotlight {
  /* Dim everything outside the rectangle. */
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 0 0 4000px rgba(9, 14, 22, 0.55);
}

/* Pulsing ripple at the exact click point. */
.dg-player-clickpoint {
  position: absolute;
  /* Size is author-adjustable per step; the pulse scales with it. */
  --dg-ripple-size: 18px;
  width: var(--dg-ripple-size);
  height: var(--dg-ripple-size);
  margin-left: calc(var(--dg-ripple-size) / -2);
  margin-top: calc(var(--dg-ripple-size) / -2);
  border-radius: 50%;
  background: var(--dg-hl, #5b8cff);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
  pointer-events: none;
  z-index: 6;
}

.dg-player-clickpoint.dg-player-target-action {
  pointer-events: auto;
  cursor: pointer;
}

.dg-player-target-action:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.dg-player-clickpoint.dg-draggable {
  pointer-events: auto;
  cursor: grab;
}

.dg-player-clickpoint.dg-dragging {
  cursor: grabbing;
}

.dg-player-clickpoint::after {
  content: "";
  position: absolute;
  inset: calc(var(--dg-ripple-size) / -3);
  border-radius: 50%;
  border: 2px solid var(--dg-hl, #5b8cff);
  animation: dg-clickpulse 1600ms ease-out infinite;
}

@keyframes dg-clickpulse {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  70% {
    transform: scale(2.1);
    opacity: 0;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dg-player-scene {
    transition: none;
  }
  .dg-player-clickpoint::after {
    animation: none;
  }
  .dg-player-typing-caret {
    animation: none;
  }
}

.dg-player-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  margin-left: -2px;
  margin-top: -2px;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  transition:
    left 60ms linear,
    top 60ms linear;
  z-index: 5;
}

.dg-player-ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid #5b8cff;
  pointer-events: none;
  z-index: 4;
}

/* Free-plan attribution. Sits clear of the tooltip and controls, and stays
   legible on any screenshot behind it. */
.dg-player-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 7;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 20, 27, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
}

.dg-player-badge:hover {
  background: rgba(15, 20, 27, 0.8);
}

.dg-player-tooltip {
  position: absolute;
  max-width: 320px;
  background: #ffffff;
  color: #2b2b27;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 6;
  font-size: 13px;
}

.dg-player-tooltip.dg-draggable {
  cursor: grab;
  /* Hint that it can be moved without adding chrome to the exported player. */
  user-select: none;
}

.dg-player-tooltip.dg-dragging {
  cursor: grabbing;
  box-shadow: 0 12px 32px rgba(9, 14, 22, 0.4);
}

.dg-player-tooltip h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
}

.dg-player-tooltip p {
  margin: 0;
  color: #55564f;
  font-size: 12px;
}

.dg-player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #232320;
  border-top: 1px solid #33332e;
}

.dg-player-controls button {
  appearance: none;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
}

.dg-player-controls button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dg-player-controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dg-player-controls button.dg-player-next {
  background: var(--dg-button, #2563eb);
}

.dg-player-controls button.dg-player-next:hover {
  background: var(--dg-button, #2563eb);
  filter: brightness(0.9);
}

.dg-player-progress {
  flex: 1;
  height: 4px;
  background: #3a3a34;
  border-radius: 999px;
  overflow: hidden;
}

.dg-player-progress-fill {
  height: 100%;
  background: var(--dg-progress, var(--dg-hl, #5b8cff));
  transition: width 0.2s ease;
}

.dg-player-step-counter {
  font-size: 11px;
  color: #b7bcae;
  white-space: nowrap;
}

.dg-player-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  background: #1c1c19;
  z-index: 10;
}

.dg-player-screen h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.dg-player-screen p {
  margin: 0 0 20px;
  color: #b7bcae;
  max-width: 360px;
}

.dg-player-screen button {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .dg-player-video,
  .dg-player-cursor,
  .dg-player-highlight {
    transition: none !important;
  }
}


/* The marketing examples use the real player with a purpose-built stage skin. */
.dg-player-root {
  border-radius: 0;
  background: #0b1424;
}

.dg-player-stage {
  background: #eef2f7;
}

.dg-player-controls {
  border-top-color: rgba(255,255,255,.08);
  background: #0b1424;
}

.dg-player-screen {
  background:
    radial-gradient(circle at 50% 15%, #dc262646, transparent 42%),
    linear-gradient(145deg, #101c31, #07111f 72%);
}

.dg-player-screen::before {
  content: "SHOWHOW GUIDE";
  margin-bottom: 14px;
  color: #dc2626;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
}

.dg-player-screen h2 {
  max-width: 520px;
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: -.02em;
}

.dg-player-screen p {
  color: #a8b5c7;
  font-size: clamp(11px, 1.6vw, 14px);
  line-height: 1.55;
}

.dg-player-screen button {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: #dc2626 !important;
  box-shadow: 0 12px 28px #dc262638;
}
