/* --- effect.bg-beams.css --- */
[data-effect~="bg-beams"].beams-active .beam {
  opacity: 0.9;
  animation: dtfBeamsPulse 6s ease-in-out infinite;
}

[data-effect~="bg-beams"].beams-static .beam {
  opacity: 0.28;
  animation: none;
}

@keyframes dtfBeamsPulse {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-6px); opacity: 0.9; }
}


/* --- effect.dotted-glow.css --- */
[data-effect~="dotted-glow"] {
  position: relative;
  overflow: hidden;
}

[data-effect~="dotted-glow"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 122, 0, 0.24) 1px, transparent 0);
  background-size: 18px 18px;
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

[data-effect~="dotted-glow"].dotted-active::before,
[data-effect~="dotted-glow"].dotted-static::before {
  opacity: 0.64;
}


/* --- effect.encrypted-text.css --- */
[data-effect~="encrypted-text"] {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.04em;
  color: rgba(157, 173, 255, 0.92);
  white-space: nowrap;
}


/* --- effect.pointer-highlight.css --- */
.pointer-highlight {
  position: relative;
  display: inline;
  box-decoration-break: clone;
}

.pointer-highlight::after {
  content: "";
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  bottom: 0.02em;
  height: 0.5em;
  background: linear-gradient(180deg, rgba(255, 132, 0, 0.0), rgba(255, 132, 0, 0.35));
  transform: scaleX(0.12);
  transform-origin: left center;
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
  pointer-events: none;
}

.pointer-highlight.is-pointed::after,
.pointer-highlight:hover::after,
.pointer-highlight:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}


/* --- effect.compare.css --- */
/* ============================================
   Compare Effect
   ============================================ */

[data-compare],
[data-effect~="compare"] {
  --compare: 50%;
  position: relative;
  overflow: hidden;
}

.compare-media {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: col-resize;
}

.compare-media.is-dragging {
  cursor: grabbing;
}

.compare-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.compare-before {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--compare)) 0 0);
}

.compare-after {
  z-index: 1;
}

.compare-layer picture {
  position: absolute;
  inset: 0;
  display: block;
}

.compare-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare);
  width: 2px;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(99, 102, 241, 0) 4%,
    rgba(99, 102, 241, 0.95) 35%,
    rgba(56, 189, 248, 0.95) 65%,
    rgba(56, 189, 248, 0) 96%
  );
  box-shadow: 0 0 20px rgba(72, 125, 255, 0.35);
}

.compare-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  border: 1px solid rgba(201, 218, 255, 0.65);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(229, 236, 255, 0.9))
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M4 8l3-3v6L4 8zm8-3l-3 3 3 3V5z' fill='%2311141f'/%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(112, 134, 223, 0.22);
}

.compare-handle::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 32px;
  height: 60%;
  transform: translate(-100%, -50%);
  background: linear-gradient(
    to right,
    rgba(129, 140, 248, 0.52),
    rgba(99, 102, 241, 0.2) 45%,
    rgba(56, 189, 248, 0)
  );
  mask-image: radial-gradient(100px at left, #000, transparent);
  pointer-events: none;
}

.compare-sparkles {
  position: absolute;
  right: -18px;
  top: 0;
  width: 18px;
  height: 100%;
  pointer-events: none;
}

.compare-spark {
  position: absolute;
  right: 0;
  top: var(--spark-y, 50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 0 5px rgba(148, 197, 255, 0.9));
  opacity: 0.25;
  animation: compareSpark 1.8s ease-in-out infinite;
  animation-delay: calc(var(--spark-i, 0) * 0.14s);
}

.compare-autoplay .compare-handle {
  transition: left 50ms linear;
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 5;
  opacity: 0;
  cursor: col-resize;
  -webkit-appearance: none;
  appearance: none;
}

.compare-range-focus .compare-handle::before {
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(255, 149, 80, 0.52),
    0 0 0 5px rgba(255, 149, 80, 0.24);
}

.compare-mode-drag .compare-media,
.compare-mode-autoplay .compare-media {
  cursor: grab;
}

.proof-meta {
  padding: 12px 0 0;
}

.proof-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.proof-sub {
  font-size: 0.8rem;
  opacity: 0.72;
}

@keyframes compareSpark {
  0% {
    opacity: 0.12;
    transform: translateX(0) scale(0.6);
  }
  45% {
    opacity: 0.95;
    transform: translateX(6px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateX(10px) scale(0.5);
  }
}

@media (max-width: 640px) {
  .compare-handle::before {
    width: 25px;
    height: 25px;
    border-radius: 8px;
  }

  .compare-sparkles {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .compare-spark {
    animation: none;
    opacity: 0.35;
  }
}


/* --- effect.stateful-button.css --- */
[data-stateful],
[data-stateful-link],
[data-effect~="stateful-button"] {
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

[data-stateful].is-loading,
[data-stateful-link].is-loading,
[data-effect~="stateful-button"].is-loading {
  filter: saturate(0.85);
  opacity: 0.92;
}

[data-stateful].is-success,
[data-stateful-link].is-success,
[data-effect~="stateful-button"].is-success {
  box-shadow: 0 0 0 1px rgba(127, 209, 185, 0.48), 0 8px 20px rgba(127, 209, 185, 0.24);
}

[data-stateful].is-error,
[data-stateful-link].is-error,
[data-effect~="stateful-button"].is-error {
  box-shadow: 0 0 0 1px rgba(255, 120, 108, 0.52), 0 8px 20px rgba(255, 120, 108, 0.24);
}


/* --- effect.tracing-beam.css --- */
[data-tracing-beam] [data-tracing-beam-progress] {
  display: block;
  width: 100%;
  height: 0;
  border-radius: inherit;
  transition: height 180ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  [data-tracing-beam] [data-tracing-beam-progress] {
    height: 100% !important;
  }
}


/* --- effect.infinite-cards.css --- */
/* ============================================
   Infinite Moving Cards — SEO-safe marquee
   CSS-driven animation with clone protocol
   ============================================ */

[data-effect~="infinite-cards"] {
  overflow: hidden;
  position: relative;
}

/* Wrapper holds original + clone side by side */
.infinite-track-wrapper {
  display: flex;
  width: max-content;
  animation: dtfInfiniteScroll var(--infinite-duration, 36s) linear infinite;
  animation-direction: var(--infinite-direction, normal);
}

/* Each track (original + clone) */
.infinite-track {
  display: flex;
  gap: var(--infinite-gap, 16px);
  flex-shrink: 0;
  padding-right: var(--infinite-gap, 16px);
}

.infinite-item {
  flex: 0 0 auto;
}

/* --- States --- */
.infinite-cards-ready .infinite-track-wrapper {
  /* Animation is active */
}

.infinite-track-wrapper.is-paused {
  animation-play-state: paused;
}

/* Static fallback (reduced motion or no-JS) */
.infinite-cards-static .infinite-track-wrapper,
[data-effect~="infinite-cards"]:not(.infinite-cards-ready) .infinite-track-wrapper {
  animation: none;
}

.infinite-cards-static .infinite-track {
  animation: none;
  flex-wrap: wrap;
}

/* --- Gradient masks for smooth fade edges --- */
[data-effect~="infinite-cards"]::before,
[data-effect~="infinite-cards"]::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  z-index: 2;
  pointer-events: none;
}

[data-effect~="infinite-cards"]::before {
  left: 0;
  background: linear-gradient(to right, var(--surface-primary, #0e1016), transparent);
}

[data-effect~="infinite-cards"]::after {
  right: 0;
  background: linear-gradient(to left, var(--surface-primary, #0e1016), transparent);
}

/* --- Card styling --- */
.infinite-item .knowledge-card {
  width: 280px;
  padding: 20px;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid rgba(134, 145, 210, 0.15);
  background: rgba(14, 16, 22, 0.7);
  backdrop-filter: blur(4px);
}

.infinite-item .knowledge-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.infinite-item .knowledge-card p {
  font-size: 0.82rem;
  opacity: 0.75;
  line-height: 1.5;
}

.infinite-item .knowledge-card time {
  font-size: 0.72rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Keyframes --- */
@keyframes dtfInfiniteScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .infinite-track-wrapper {
    animation: none !important;
  }
  .infinite-cards-static .infinite-track {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* --- Mobile --- */
@media (max-width: 600px) {
  [data-effect~="infinite-cards"]::before,
  [data-effect~="infinite-cards"]::after {
    width: 10px;
  }

  .infinite-item .knowledge-card {
    width: 240px;
    padding: 14px;
  }
}


/* --- sparkles.css --- */
[data-effect~="sparkles"] {
  position: relative;
}

.sparkle-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 225, 151, 1) 0%, rgba(255, 157, 62, 0.25) 70%);
  pointer-events: none;
  animation: dtfSparkle 2.8s ease-in-out infinite;
  animation-delay: calc(var(--sparkle-index, 0) * 0.22s);
}

.sparkles-static .sparkle-dot {
  animation: none;
  opacity: 0.5;
}

@keyframes dtfSparkle {
  0%, 100% { transform: scale(0.4); opacity: 0.2; }
  50% { transform: scale(1); opacity: 0.85; }
}


/* --- floating-dock.css --- */
/* ============================================
   Floating Dock
   - Global dock: desktop only, bottom center
   - Constructor dock: contextual action bar
   ============================================ */

[data-floating-dock] {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  display: inline-flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(134, 145, 210, 0.3);
  background: linear-gradient(180deg, rgba(18, 20, 29, 0.94), rgba(12, 14, 20, 0.9));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

[data-floating-dock].dock-ready {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

[data-floating-dock].dock-scrolled {
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.5);
}

[data-floating-dock].dock-hidden {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(24px) !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

[data-floating-dock] .dock-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(139, 150, 204, 0.35);
  background: rgba(16, 19, 28, 0.92);
  color: rgba(243, 247, 255, 0.94);
  text-decoration: none;
  cursor: pointer;
  transform: translateY(var(--dock-item-lift, 0px)) scale(var(--dock-item-scale, 1));
  transform-origin: center bottom;
  will-change: transform;
  transition:
    transform 170ms cubic-bezier(0.22, 1.26, 0.32, 1),
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

[data-floating-dock] .dock-item svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

[data-floating-dock] .dock-item:hover,
[data-floating-dock] .dock-item:focus-visible {
  border-color: rgba(255, 150, 62, 0.7);
  box-shadow: 0 10px 18px rgba(255, 126, 28, 0.2);
  background: rgba(24, 28, 41, 0.95);
}

[data-floating-dock] .dock-item:focus-visible {
  outline: 2px solid rgba(255, 150, 62, 0.9);
  outline-offset: 2px;
}

[data-floating-dock] .dock-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 6px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f6f8ff;
  background: rgba(10, 12, 17, 0.95);
  border: 1px solid rgba(152, 164, 227, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
  transition: opacity 160ms ease, transform 160ms ease;
}

[data-floating-dock] .dock-item:hover .dock-tooltip,
[data-floating-dock] .dock-item:focus-visible .dock-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

[data-floating-dock] .dock-item-label {
  display: none;
}

/* Constructor dock */
[data-floating-dock][data-dock-type="constructor"] {
  position: sticky;
  left: auto;
  bottom: 14px;
  z-index: 45;
  margin: 0 auto;
  gap: 10px;
  width: fit-content;
  transform: translateX(0) translateY(12px);
}

[data-floating-dock][data-dock-type="constructor"].dock-ready {
  transform: translateX(0) translateY(0);
}

[data-floating-dock][data-dock-type="constructor"] .dock-item {
  width: auto;
  min-width: 44px;
  height: 42px;
  padding: 0 11px;
  border-radius: 12px;
}

[data-floating-dock][data-dock-type="constructor"] .dock-item-label {
  display: inline;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(238, 242, 255, 0.9);
}

[data-floating-dock][data-dock-type="constructor"] .dock-icon svg {
  width: 16px;
  height: 16px;
}

[data-floating-dock][data-dock-type="constructor"] .dock-tooltip {
  bottom: calc(100% + 7px);
}

/* Badge */
.dock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  margin-left: 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.dock-badge[hidden] {
  display: none;
}

.dock-badge.badge-pending {
  color: #d3dbff;
  background: rgba(122, 135, 191, 0.24);
}

.dock-badge.badge-ok {
  color: #57e19a;
  background: rgba(74, 190, 130, 0.22);
}

.dock-badge.badge-warn {
  color: #ffcb6f;
  background: rgba(207, 152, 51, 0.24);
}

.dock-badge.badge-fail {
  color: #ff8c8c;
  background: rgba(201, 76, 76, 0.24);
}

.dock-badge.badge-has-preview {
  color: transparent;
  background-image: var(--badge-preview);
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

@media (max-width: 960px) {
  [data-floating-dock]:not([data-dock-type="constructor"]) {
    display: none !important;
  }
}

@media (max-width: 640px) {
  [data-floating-dock][data-dock-type="constructor"] {
    position: fixed;
    left: 50%;
    bottom: calc(72px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(12px);
    width: calc(100% - 20px);
    justify-content: space-around;
    border-radius: 16px;
  }

  [data-floating-dock][data-dock-type="constructor"].dock-ready {
    transform: translateX(-50%) translateY(0);
  }

  [data-floating-dock][data-dock-type="constructor"] .dock-item {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-floating-dock] .dock-item {
    transition: none !important;
    transform: none !important;
  }
}


/* --- multi-step-loader.css --- */
/* ============================================
   Multi-step Loader — real file check steps
   Animated step display with PASS/WARN/FAIL
   ============================================ */

/* --- Legacy upload step chips --- */
[data-upload-flow] .upload-steps [data-upload-step] {
  opacity: 0.55;
  border-color: rgba(100, 108, 151, 0.35);
  transition: opacity 180ms ease, border-color 180ms ease, transform 180ms ease;
}

[data-upload-flow] .upload-steps [data-upload-step].is-active {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(255, 138, 45, 0.75);
}

[data-upload-flow] .upload-steps [data-upload-step].is-done {
  opacity: 0.9;
  border-color: rgba(79, 214, 143, 0.8);
}

/* --- Multi-Step Loader container --- */
.msl-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}

.msl-container.msl-active {
  /* Active state */
}

/* --- Individual step --- */
.msl-step {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.82rem;
  transition: background 180ms ease;
}

.msl-step:hover {
  background: rgba(134, 145, 210, 0.06);
}

/* --- Step icon --- */
.msl-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Status colors --- */
.msl-status-ok .msl-step-icon,
.msl-status-pass .msl-step-icon {
  background: rgba(79, 214, 143, 0.15);
  color: #4fd68f;
  border: 1px solid rgba(79, 214, 143, 0.3);
}

.msl-status-warn .msl-step-icon {
  background: rgba(255, 186, 73, 0.15);
  color: #ffba49;
  border: 1px solid rgba(255, 186, 73, 0.3);
}

.msl-status-fail .msl-step-icon {
  background: rgba(255, 92, 92, 0.15);
  color: #ff5c5c;
  border: 1px solid rgba(255, 92, 92, 0.3);
}

.msl-status-pending .msl-step-icon,
.msl-status-skipped .msl-step-icon {
  background: rgba(134, 145, 210, 0.08);
  color: rgba(134, 145, 210, 0.4);
  border: 1px solid rgba(134, 145, 210, 0.15);
}

.msl-status-loading .msl-step-icon {
  background: rgba(134, 145, 210, 0.12);
  color: #8691d2;
  border: 1px solid rgba(134, 145, 210, 0.3);
  animation: mslSpin 1s linear infinite;
}

/* --- Labels and messages --- */
.msl-step-label {
  font-weight: 600;
  color: var(--text-primary, #f7f8ff);
}

.msl-step-message {
  font-size: 0.78rem;
  opacity: 0.7;
  text-align: right;
}

.msl-step-value {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  opacity: 0.55;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(134, 145, 210, 0.08);
}

/* Status-specific text colors */
.msl-status-ok .msl-step-label { color: #4fd68f; }
.msl-status-warn .msl-step-label { color: #ffba49; }
.msl-status-fail .msl-step-label { color: #ff5c5c; }
.msl-status-skipped .msl-step-label { opacity: 0.35; }
.msl-status-skipped .msl-step-message { opacity: 0.25; }

/* --- Recommendations list --- */
.msl-recommendations {
  grid-column: 1 / -1;
  list-style: none;
  padding: 8px 0 0 36px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msl-recommendations li {
  font-size: 0.76rem;
  opacity: 0.7;
  padding-left: 12px;
  position: relative;
}

.msl-recommendations li::before {
  content: '\2192'; /* → */
  position: absolute;
  left: 0;
  opacity: 0.5;
}

/* --- Animations --- */
@keyframes mslSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .msl-step {
    grid-template-columns: 24px 1fr;
    gap: 6px;
    padding: 6px 8px;
  }

  .msl-step-message {
    grid-column: 2;
    text-align: left;
  }

  .msl-step-value {
    grid-column: 2;
  }
}


/* --- vanish-input.css --- */
/* ============================================
   Vanish Input
   - Invalid input: shake + dissolve + clear
   - Overlay placeholders with cycle animation
   ============================================ */

.vanish-field-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.vanish-field-wrap > [data-vanish-input] {
  position: relative;
  z-index: 2;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    filter 180ms ease,
    opacity 180ms ease;
}

.vanish-field-wrap .vanish-placeholder {
  position: absolute;
  z-index: 3;
  left: 14px;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(228, 233, 252, 0.5);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 150ms ease, transform 150ms ease;
}

.vanish-field-wrap .vanish-placeholder:empty {
  display: none;
}

.vanish-field-wrap.is-focused .vanish-placeholder,
.vanish-field-wrap.has-value .vanish-placeholder,
.vanish-field-wrap.is-animating .vanish-placeholder {
  opacity: 0;
  transform: translateY(-58%);
}

.vanish-field-wrap .vanish-placeholder.vanish-placeholder-out {
  animation: vanishPlaceholderOut 180ms ease forwards;
}

.vanish-field-wrap .vanish-placeholder.vanish-placeholder-in {
  animation: vanishPlaceholderIn 180ms ease forwards;
}

[data-vanish-input].vanish-shake,
[data-vanish-input].is-vanish {
  animation: vanishShake 320ms ease;
  border-color: rgba(255, 92, 92, 0.84) !important;
  box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.2);
}

[data-vanish-input].vanish-dissolve {
  animation: vanishDissolve 320ms ease forwards;
  border-color: rgba(255, 143, 79, 0.86) !important;
  caret-color: transparent;
}

@keyframes vanishShake {
  0% { transform: translateX(0); }
  18% { transform: translateX(-6px); }
  34% { transform: translateX(5px); }
  52% { transform: translateX(-4px); }
  70% { transform: translateX(3px); }
  86% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

@keyframes vanishDissolve {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
  50% {
    opacity: 0.68;
    filter: blur(2px);
    transform: scale(0.985);
  }
  100% {
    opacity: 0.08;
    filter: blur(6px);
    transform: scale(0.97) translateY(-2px);
  }
}

@keyframes vanishPlaceholderOut {
  from {
    opacity: 1;
    transform: translateY(-50%);
  }
  to {
    opacity: 0;
    transform: translateY(-70%);
  }
}

@keyframes vanishPlaceholderIn {
  from {
    opacity: 0;
    transform: translateY(-34%);
  }
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-vanish-input].vanish-shake,
  [data-vanish-input].vanish-dissolve {
    animation: none !important;
  }

  .vanish-field-wrap .vanish-placeholder.vanish-placeholder-out,
  .vanish-field-wrap .vanish-placeholder.vanish-placeholder-in {
    animation: none !important;
  }
}


/* --- tabs-download.css --- */
[data-template-tabs] .template-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(98, 106, 141, 0.6);
  background: rgba(13, 16, 24, 0.8);
}

[data-template-tabs] [data-tab-target] {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  color: #cfd7ff;
  cursor: pointer;
}

[data-template-tabs] [data-tab-target].is-active {
  background: linear-gradient(120deg, rgba(255, 122, 0, 0.26), rgba(110, 156, 255, 0.2));
  color: #ffffff;
}

[data-template-tabs] [data-tab-panel] {
  margin-top: 14px;
}


/* --- cards-on-click.css --- */
#gallery-case-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 120;
}

#gallery-case-modal.is-open {
  display: block;
}

#gallery-case-modal .case-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
}

#gallery-case-modal .case-modal-dialog {
  position: relative;
  width: min(880px, calc(100vw - 24px));
  margin: 36px auto;
  border-radius: 20px;
  border: 1px solid rgba(120, 131, 178, 0.55);
  background: #11151d;
  padding: 16px;
}

#gallery-case-modal .case-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.gallery-open-btn {
  margin-top: 8px;
}


/* --- effect.speed-text.css --- */
/* ============================================
   Speed / Tremble Text
   Per-character animation for "day in day" copy
   ============================================ */

[data-effect~="speed-text"] {
  display: inline-flex;
  align-items: baseline;
  position: relative;
  white-space: nowrap;
  gap: 0;
  cursor: default;
  color: inherit;
}

[data-effect~="speed-text"] .speed-char {
  position: relative;
  display: inline-block;
  transform: translate3d(0, 0, 0);
  will-change: transform, filter;
}

[data-effect~="speed-text"] .speed-char-space {
  width: 0.32em;
}

[data-effect~="speed-text"] .speed-char::after {
  content: attr(data-char);
  position: absolute;
  inset: 0;
  color: rgba(255, 154, 74, 0.4);
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
  transform: translateX(0);
}

[data-effect~="speed-text"].speed-text-active .speed-char:not(.speed-char-space) {
  animation-name: speedCharShake;
  animation-duration: var(--speed-duration, 680ms);
  animation-timing-function: cubic-bezier(0.25, 0.8, 0.24, 1);
  animation-fill-mode: both;
  animation-iteration-count: 1;
  animation-delay: var(--char-delay, 0ms);
}

[data-effect~="speed-text"].speed-text-active .speed-char:not(.speed-char-space)::after {
  animation-name: speedCharGhost;
  animation-duration: var(--speed-duration, 680ms);
  animation-timing-function: ease-out;
  animation-fill-mode: both;
  animation-iteration-count: 1;
  animation-delay: var(--char-delay, 0ms);
}

[data-effect~="speed-text"].speed-text-static .speed-char,
[data-effect~="speed-text"].speed-text-static .speed-char::after {
  animation: none !important;
}

@keyframes speedCharShake {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    filter: blur(0);
  }
  14% {
    transform: translate3d(calc(-1px * var(--speed-intensity, 1) * var(--char-shift, 1)), calc(-0.6px * var(--speed-intensity, 1)), 0)
      rotate(calc(-0.6deg * var(--char-rot, 1)));
  }
  30% {
    transform: translate3d(calc(1.4px * var(--speed-intensity, 1) * var(--char-shift, 1)), calc(0.7px * var(--speed-intensity, 1)), 0)
      rotate(calc(0.7deg * var(--char-rot, 1)));
  }
  48% {
    transform: translate3d(calc(-1.1px * var(--speed-intensity, 1) * var(--char-shift, 1)), calc(0.3px * var(--speed-intensity, 1)), 0)
      rotate(calc(-0.5deg * var(--char-rot, 1)));
  }
  68% {
    transform: translate3d(calc(1.1px * var(--speed-intensity, 1) * var(--char-shift, 1)), calc(-0.3px * var(--speed-intensity, 1)), 0)
      rotate(calc(0.5deg * var(--char-rot, 1)));
    filter: blur(0.12px);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes speedCharGhost {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  18% {
    opacity: 0.34;
    transform: translateX(calc(2.2px * var(--speed-intensity, 1)));
  }
  56% {
    opacity: 0.16;
    transform: translateX(calc(-1.4px * var(--speed-intensity, 1)));
  }
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-effect~="speed-text"] .speed-char,
  [data-effect~="speed-text"] .speed-char::after {
    animation: none !important;
  }
}


/* --- effect.tooltip-card.css --- */
/* ============================================
   Tooltip Card — rich tooltip following mouse
   For file check terms explanation
   ============================================ */

.dtf-tooltip-card {
  position: fixed;
  z-index: 999;
  min-width: 200px;
  max-width: 320px;
  padding: 0;
  border-radius: var(--radius-md, 8px);
  border: 1px solid rgba(134, 145, 210, 0.2);
  background: rgba(14, 16, 22, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(134, 145, 210, 0.1);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease;
  overflow: hidden;
}

.dtf-tooltip-card.dtf-tooltip-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dtf-tooltip-inner {
  padding: 10px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary, #b4bcd0);
}

.dtf-tooltip-inner strong {
  color: var(--text-primary, #f7f8ff);
}

.dtf-tooltip-inner img {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm, 4px);
  margin-bottom: 8px;
}

/* Term highlight style for inline trigger */
[data-tooltip-content],
[data-effect~="tooltip-card"] {
  cursor: help;
  border-bottom: 1px dashed rgba(134, 145, 210, 0.4);
  transition: border-color 150ms ease;
}

[data-tooltip-content]:hover,
[data-effect~="tooltip-card"]:hover {
  border-bottom-color: var(--accent, #ff8a2d);
}

/* --- Preflight terms row --- */
.filecheck-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.78rem;
}

.filecheck-terms span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filecheck-terms .filecheck-terms-hint {
  font-weight: 700;
  color: rgba(246, 232, 201, 0.95);
  margin-right: 6px;
}

.filecheck-terms .filecheck-terms-hint .dtf-icon {
  width: 18px;
  height: 18px;
}

.filecheck-terms abbr {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-secondary, #b4bcd0);
}

.filecheck-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}

.filecheck-status-legend .icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.filecheck-status-legend .dtf-icon {
  width: 20px;
  height: 20px;
}

.filecheck-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.filecheck-summary {
  margin-top: 8px;
  color: rgba(255, 198, 130, 0.96);
  font-size: 0.88rem;
  line-height: 1.45;
}


/* --- effect.text-generate.css --- */
/* ============================================
   Text Generate Effect — word-by-word fade-in
   For file check summary text
   ============================================ */

[data-effect~="text-generate"] {
  /* Container ready */
}

.text-generate-ready .tg-word {
  display: inline-block;
  transition: opacity 300ms ease, filter 300ms ease;
}

.text-generate-static .tg-word {
  opacity: 1 !important;
  filter: none !important;
}

.text-generate-played .tg-word {
  /* All words revealed */
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .text-generate-ready .tg-word {
    opacity: 1 !important;
    filter: none !important;
    transition: none !important;
  }
}


/* --- effect.images-badge.css --- */
/* ============================================
   Images Badge — folder with hover fan-out
   For constructor file state indication
   ============================================ */

.images-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}

.images-badge-ready {
  /* initialized */
}

/* --- Folder structure --- */
.ib-folder {
  position: relative;
  border-radius: 2px 6px 4px 4px;
  background: rgba(134, 145, 210, 0.15);
  border: 1px solid rgba(134, 145, 210, 0.25);
  overflow: visible;
}

.ib-folder-tab {
  position: absolute;
  top: -5px;
  left: 0;
  width: 40%;
  height: 5px;
  background: rgba(134, 145, 210, 0.2);
  border-radius: 2px 2px 0 0;
}

.ib-folder-body {
  width: 100%;
  height: 100%;
}

/* --- Preview images (inside folder) --- */
.ib-preview-img {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  transform: translateX(-50%);
  opacity: 0.7;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Stacked effect for multiple images */
.ib-preview-img:nth-child(3) {
  top: 1px;
}
.ib-preview-img:nth-child(4) {
  top: 3px;
}

/* --- Label text --- */
.ib-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary, #b4bcd0);
  white-space: nowrap;
  transition: color 200ms ease;
}

.images-badge:hover .ib-label {
  color: var(--text-primary, #f7f8ff);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .ib-preview-img {
    transition: none !important;
    transform: translateX(-50%) !important;
  }
}
