 /* ============================================================
   Pretvfx-Tools — Downloader (TikTok no-server)
   Tema: dark indigo/purple
   ============================================================ */
.pfx-dl-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 2px 24px;
  box-sizing: border-box;
}

/* ---------- Section & label ---------- */
.pfx-dl-section { display: flex; flex-direction: column; gap: 8px; }
.pfx-dl-label {
  font-size: .78rem;
  font-weight: 700;
  color: rgba(199, 210, 254, .65);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Input row ---------- */
.pfx-dl-inputrow { display: flex; gap: 8px; align-items: stretch; }
.pfx-dl-input {
  flex: 1;
  min-width: 0;
  background: rgba(15, 19, 32, 0.55);
  border: 1.5px solid rgba(99, 102, 241, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  color: #e8ecff;
  font-size: .92rem;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
}
.pfx-dl-input::placeholder { color: rgba(199, 210, 254, .4); }
.pfx-dl-input:focus {
  border-color: rgba(99, 102, 241, .6);
  background: rgba(15, 19, 32, 0.75);
}

/* Paste button — match dua class (JS baru & lama) */
.pfx-dl-iconbtn,
.pfx-dl-paste {
  flex-shrink: 0;
  width: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.18);
  border: 1.5px solid rgba(99, 102, 241, .35);
  color: #c7d2fe;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s ease, transform .12s ease;
}
.pfx-dl-iconbtn:hover,
.pfx-dl-paste:hover { background: rgba(99, 102, 241, .28); }
.pfx-dl-iconbtn:active,
.pfx-dl-paste:active { transform: scale(.96); }

/* ---------- Tombol ---------- */
.pfx-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 14px;
  border: none;
  font-size: .92rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, filter .15s ease,
              opacity .18s ease, background .18s ease;
}
.pfx-dl-btn:active:not([disabled]) { transform: scale(.97); }
.pfx-dl-btn.primary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  box-shadow: 0 8px 22px rgba(99, 102, 241, .35);
}
.pfx-dl-btn.primary:hover:not([disabled]) { filter: brightness(1.08); }
.pfx-dl-btn:not(.primary) {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(99,102,241,.28);
  color: #c7d2fe;
}
.pfx-dl-btn:not(.primary):hover:not([disabled]) {
  background: rgba(99,102,241,.14);
}
.pfx-dl-btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(.4);
}

/* ---------- Progress ---------- */
.pfx-dl-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 19, 32, 0.55);
  border: 1px solid rgba(99, 102, 241, 0.22);
}
.pfx-dl-progress-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: #c7d2fe;
  font-weight: 600;
}
.pfx-dl-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.pfx-dl-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width .3s ease;
}

/* ---------- Kartu hasil (SATU definisi, tidak duplikat) ---------- */
.pfx-dl-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 19, 32, 0.55);
  border: 1px solid rgba(99, 102, 241, 0.28);
  box-sizing: border-box;
  width: 100%;
}

/* ---------- Author row ---------- */
.pfx-dl-result-row { display: flex; align-items: center; gap: 12px; }
.pfx-dl-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(99,102,241,.28);
}
.pfx-dl-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
  font-size: 1.2rem;
}
.pfx-dl-result-info { min-width: 0; flex: 1; }
.pfx-dl-result-title {
  font-size: .9rem;
  font-weight: 700;
  color: #e8ecff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pfx-dl-result-meta {
  font-size: .76rem;
  color: rgba(199,210,254,.6);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Caption ---------- */
.pfx-dl-caption {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(199, 210, 254, .75);
  line-height: 1.5;
  padding: 10px 12px;
  background: rgba(15, 19, 32, 0.4);
  border-radius: 10px;
  max-height: 90px;
  overflow-y: auto;
  word-break: break-word;
}
.pfx-dl-caption::-webkit-scrollbar { width: 4px; }
.pfx-dl-caption::-webkit-scrollbar-thumb {
  background: rgba(99,102,241,.4);
  border-radius: 4px;
}

/* ---------- Video preview ---------- */
.pfx-dl-video {
  width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  background: #000;
  display: block;
  object-fit: contain;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

/* ---------- Galeri (slideshow) ---------- */
.pfx-dl-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.pfx-dl-gallery-item {
  position: relative;
  padding: 0;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  display: block;
  transition: transform .12s ease, border-color .18s ease;
}
.pfx-dl-gallery-item:hover {
  border-color: rgba(99, 102, 241, .6);
  transform: scale(1.02);
}
.pfx-dl-gallery-item:active { transform: scale(.97); }
.pfx-dl-gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.pfx-dl-gallery-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 1;
  background: rgba(15, 19, 32, 0.82);
  color: #c7d2fe;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

/* ---------- Grup tombol unduh ---------- */
.pfx-dl-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pfx-dl-note {
  font-size: .75rem;
  color: rgba(199, 210, 254, .55);
  font-weight: 600;
  text-align: center;
  padding: 10px 12px;
  background: rgba(15, 19, 32, 0.4);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: 10px;
}

/* ---------- Error ---------- */
.pfx-dl-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.4;
}
.pfx-dl-error i {
  font-size: .95rem;
  margin-top: 1px;
  flex-shrink: 0;
}
.pfx-dl-error span { flex: 1; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .pfx-dl-gallery { grid-template-columns: repeat(2, 1fr); }
}
/* ============================================================
   FIX: paksa avatar tetap kecil & bulat
   (mengalahkan rule img { width: 100% } dari parent overlay)
   ============================================================ */
.pfx-dl-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pfx-dl-thumb {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  flex: 0 0 48px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(99,102,241,.28);
}
.pfx-dl-thumb-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.pfx-dl-thumb-wrap .pfx-dl-thumb {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  display: block;
}
/* ============================================================
   FIX avatar — kunci ukuran 48px, biar tidak ketarik parent
   ============================================================ */
.pfx-dl-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pfx-dl-thumb-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  border: 1.5px solid rgba(99, 102, 241, .28);
}
.pfx-dl-author-avatar {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  border: none !important;
}
.pfx-dl-author-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
  font-size: 1.2rem;
}
.pfx-dl-author-info { min-width: 0; flex: 1; }
.pfx-dl-author-name {
  font-size: .9rem;
  font-weight: 700;
  color: #e8ecff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pfx-dl-author-meta {
  font-size: .76rem;
  color: rgba(199, 210, 254, .6);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}