/* Оживление фото: стили, загрузка, ожидание и результат. Палитра сайта. */
.anim-page {
  padding: 0 0 56px;
}
.anim-page [hidden] {
  display: none !important;
}

/* --- шапка --------------------------------------------------------- */
.anim-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 0 18px;
}
.anim-head__text {
  min-width: 0;
}
.anim-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(226, 112, 187, 0.35);
  background-color: rgba(226, 112, 187, 0.08);
  color: #E270BB;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.anim-badge svg {
  width: 14px;
  height: 14px;
}
.anim-head__title {
  margin-top: 10px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #FFF;
}
.anim-head__lead {
  max-width: 640px;
  margin-top: 8px;
  color: #848282;
  font-size: 0.92em;
  line-height: 1.6;
}
.anim-head__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.anim-balance {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #FFF;
  font-size: 0.9em;
  font-weight: 500;
}
.anim-balance img {
  width: 16px;
  height: 16px;
}
.anim-balance b {
  color: #E270BB;
  font-variant-numeric: tabular-nums;
}
.anim-balance--small {
  font-size: 0.8em;
  color: #848282;
}

.anim-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #E270BB;
  font-size: 0.88em;
  font-weight: 600;
  border-bottom: 1px dashed rgba(226, 112, 187, 0.45);
}
.anim-link:hover {
  border-bottom-style: solid;
}
.anim-link svg {
  width: 15px;
  height: 15px;
}
.anim-link--inline {
  font-size: inherit;
}
.anim-link--small {
  font-size: 0.8em;
}

/* --- ошибки ------------------------------------------------------- */
.anim-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 107, 0.4);
  background-color: rgba(255, 107, 107, 0.08);
  color: #ffb4b4;
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.45;
}
.anim-alert__icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #FF6B6B;
}
.anim-alert__link {
  margin-left: auto;
  color: #FFF;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
}

/* --- панели ожидания/результата ----------------------------------- */
.anim-panel {
  margin-bottom: 18px;
  padding: 26px 22px;
  border: 1px solid #2d2d2d;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(226, 112, 187, 0.06), transparent 62%),
    #252525;
  text-align: center;
}
.anim-panel__title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.15em;
  font-weight: 700;
  color: #FFF;
}
.anim-panel__text {
  margin: 6px auto 0;
  max-width: 560px;
  color: #848282;
  font-size: 0.88em;
  line-height: 1.55;
}
.anim-panel__text--left {
  margin-left: 0;
}
.anim-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.anim-spinner {
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
}
.anim-spinner svg {
  width: 100%;
  height: 100%;
  animation: anim-spin 1.4s linear infinite;
}
.anim-spinner svg circle {
  stroke: #E270BB;
  stroke-dasharray: 80, 150;
  stroke-dashoffset: 0;
  animation: anim-dash 1.4s ease-in-out infinite;
}
@keyframes anim-spin {
  100% {
    transform: rotate(360deg);
  }
}
@keyframes anim-dash {
  0% {
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dashoffset: -125;
  }
}
.anim-progress {
  position: relative;
  width: min(360px, 100%);
  height: 6px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background-color: #2d2d2d;
}
.anim-progress span {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #E270BB, transparent);
  animation: anim-progress 1.5s ease-in-out infinite;
}
@keyframes anim-progress {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

.anim-result__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 16px;
}
.anim-result__check {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(226, 112, 187, 0.14);
  color: #E270BB;
}
.anim-result__check svg {
  width: 22px;
  height: 22px;
}
.anim-result__video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 62vh;
  margin: 0 auto;
  border: 1px solid #2d2d2d;
  border-radius: 14px;
  background-color: #000;
}
.anim-result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

/* --- кнопки ------------------------------------------------------- */
.anim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  color: #FFF;
  font-size: 0.9em;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.anim-btn svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.anim-btn--primary {
  background: linear-gradient(135deg, #E270BB, #c255a0);
  box-shadow: 0 12px 26px -14px rgba(226, 112, 187, 0.9);
}
.anim-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -14px rgba(226, 112, 187, 1);
}
.anim-btn--ghost {
  background-color: #1f1f1f;
  border: 1px solid #3a3a3a;
}
.anim-btn--ghost:hover {
  border-color: rgba(226, 112, 187, 0.5);
}

/* --- форма -------------------------------------------------------- */
.anim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.anim-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #2d2d2d;
  border-radius: 16px;
  background-color: #252525;
}
.anim-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.anim-step {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #FFF;
  font-size: 0.8em;
  font-weight: 700;
  background: linear-gradient(135deg, #E270BB, #b4528f);
  box-shadow: 0 4px 12px rgba(226, 112, 187, 0.35);
}
.anim-card__title {
  color: #FFF;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.3;
}
.anim-card__hint {
  margin-top: 2px;
  color: #848282;
  font-size: 0.78em;
  line-height: 1.4;
}

/* --- промт -------------------------------------------------------- */
.anim-prompt {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anim-prompt__input {
  width: 100%;
  min-height: 150px;
  padding: 12px 14px;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  background-color: #1b1b1b;
  color: #EDEAEA;
  font-size: 0.88em;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.anim-prompt__input::placeholder {
  color: #6f6f6f;
}
.anim-prompt__input:focus {
  border-color: rgba(226, 112, 187, 0.6);
  outline: none;
}
.anim-prompt__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}
.anim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.anim-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #3a3a3a;
  background-color: #1f1f1f;
  color: #C9C4C4;
  font-size: 0.74em;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.anim-chip:hover {
  color: #FFF;
  border-color: rgba(226, 112, 187, 0.55);
  background-color: rgba(226, 112, 187, 0.12);
}
.anim-prompt__count {
  margin-top: 4px;
  color: #7c7c7c;
  font-size: 0.72em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- советы ------------------------------------------------------- */
.anim-tips {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #343434;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.02);
}
.anim-tips__title {
  display: block;
  margin-bottom: 8px;
  color: #C9C4C4;
  font-size: 0.76em;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.anim-tips__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.anim-tips__list li {
  position: relative;
  padding-left: 18px;
  color: #848282;
  font-size: 0.78em;
  line-height: 1.45;
}
.anim-tips__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background-color: #E270BB;
  opacity: 0.75;
}

/* --- загрузка ----------------------------------------------------- */
.anim-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  overflow: hidden;
  padding: 16px;
  border: 2px dashed #2d2d2d;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(226, 112, 187, 0.07), transparent 62%),
    #1b1b1b;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.anim-drop:hover,
.anim-drop:focus-visible {
  border-color: rgba(226, 112, 187, 0.75);
}
.anim-drop_drag {
  border-color: #E270BB;
  background-color: rgba(226, 112, 187, 0.1);
}
.anim-drop_filled {
  border-style: solid;
  border-color: #3a3a3a;
}
.anim-drop__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.anim-drop__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 50%;
  background-color: rgba(226, 112, 187, 0.1);
  color: #E270BB;
}
.anim-drop__icon svg {
  width: 32px;
  height: 32px;
}
.anim-drop__title {
  color: #FFF;
  font-size: 0.95em;
  font-weight: 600;
}
.anim-drop__hint {
  color: #848282;
  font-size: 0.8em;
}
.anim-drop__cta {
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(226, 112, 187, 0.4);
  background-color: rgba(226, 112, 187, 0.08);
  color: #E270BB;
  font-size: 0.76em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.anim-drop:hover .anim-drop__cta {
  background-color: #E270BB;
  color: #FFF;
}
.anim-drop__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.anim-drop__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0));
  text-align: left;
}
.anim-drop__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #FFF;
  font-size: 0.78em;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.anim-drop__size {
  flex: 0 0 auto;
  color: #C9C4C4;
  font-size: 0.75em;
}
.anim-drop__remove {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.16);
  color: #FFF;
  transition: background-color 0.2s ease;
}
.anim-drop__remove svg {
  width: 13px;
  height: 13px;
}
.anim-drop__remove:hover {
  background-color: #E270BB;
}

/* --- кнопка запуска ----------------------------------------------- */
.anim-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 15px 18px;
  border-radius: 13px;
  color: #FFF;
  font-size: 1em;
  font-weight: 600;
  background: linear-gradient(135deg, #E270BB, #c255a0);
  box-shadow: 0 12px 28px -14px rgba(226, 112, 187, 0.95);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.anim-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px -14px rgba(226, 112, 187, 1);
}
.anim-submit:disabled {
  background: #2d2d2d;
  color: #848282;
  box-shadow: none;
  cursor: not-allowed;
}
.anim-submit .anim-submit__text {
  margin: 0;
}
.anim-submit__icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}
.anim-submit__icon svg {
  width: 18px;
  height: 18px;
}
.anim-submit__price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.18);
  font-size: 0.82em;
}
.anim-submit__price img {
  width: 14px;
  height: 14px;
}
.anim-submit:disabled .anim-submit__price {
  background-color: rgba(255, 255, 255, 0.06);
}
.anim-submit_loading .anim-submit__icon {
  display: none;
}
.anim-submit__spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: anim-spin 0.8s linear infinite;
}

.anim-under {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.anim-note {
  margin-top: 10px;
  color: #7c7c7c;
  font-size: 0.75em;
  line-height: 1.5;
}

/* --- адаптив ------------------------------------------------------ */
@media (max-width: 900px) {
  .anim-grid {
    grid-template-columns: 1fr;
  }
  .anim-drop {
    aspect-ratio: auto;
    min-height: 200px;
  }
}
@media (max-width: 600px) {
  .anim-head {
    padding: 20px 0 14px;
  }
  .anim-head__meta {
    width: 100%;
    justify-content: space-between;
  }
  .anim-card {
    padding: 14px;
  }
  .anim-result__head {
    flex-direction: column;
    text-align: center;
  }
  .anim-panel__text--left {
    margin-left: auto;
  }
  .anim-result__actions .anim-btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anim-spinner svg,
  .anim-spinner svg circle,
  .anim-progress span,
  .anim-submit__spinner {
    animation: none !important;
  }
  .anim-btn,
  .anim-submit,
  .anim-drop {
    transition: none !important;
  }
}
