/* ─── Shared App Detail Popup ─── */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.20), 0 2px 8px rgba(0,0,0,0.06);
  width: min(680px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding: 1.5rem;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s ease;
  display: none;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  clip-path: inset(0 round 22px);
}
.popup-card::-webkit-scrollbar {
  width: 6px;
}
.popup-card::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}
.popup-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.popup-card::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.popup-card.active {
  transform: translateY(0) scale(1);
  display: block;
}

.popup-close-x {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #6b7280;
  z-index: 25;
  padding: 4px 8px;
  border-radius: 50%;
  transition: 0.2s;
  line-height: 1;
}
.popup-close-x:hover {
  background: #f3f4f6;
  color: #111827;
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.25rem;
}
.popup-header .card-icon-circle {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  z-index: 5;
}
.popup-header-info { flex: 1; }
.popup-header-info h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 2px 0;
}
.popup-header-info .badge-text {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 9999px;
  padding: 3px 10px;
}

.popup-slider {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 2;
  background: linear-gradient(180deg, #eef0f2 0%, #e5e7eb 100%);
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.popup-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}
.popup-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef0f2 0%, #e5e7eb 100%);
}
.popup-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.popup-slide .placeholder-text {
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 500;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: 0.2s;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.slider-btn:hover {
  background: rgba(0,0,0,0.65);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.slider-btn.prev { left: 8px; }
.slider-btn.next { right: 8px; }

.popup-section {
  margin-bottom: 1.1rem;
}
.popup-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.4rem 0;
}
.popup-section p {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.5;
  margin: 0;
}
.popup-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.popup-features li {
  font-size: 0.85rem;
  color: #374151;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.popup-features li:last-child {
  border-bottom: none;
}
.popup-features li::before {
  content: '-';
  margin-right: 8px;
  color: #9ca3af;
  font-weight: 700;
}

.popup-history {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 22px;
}
.popup-history::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e5e7eb;
  border-radius: 1px;
}
.popup-history .history-item {
  position: relative;
  margin-bottom: 10px;
}
.popup-history .history-item:last-child {
  margin-bottom: 0;
}
.popup-history .history-node {
  position: absolute;
  left: -19px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #9ca3af;
}
.popup-history .history-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.popup-history .ver-chip {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #111827;
}
.popup-history .history-date {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 500;
}
.popup-history .history-note {
  font-size: 0.76rem;
  color: #4b5563;
  line-height: 1.4;
}
.popup-history .hidden-history {
  display: none;
}
.popup-load-more {
  background: none;
  border: none;
  color: #111827;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 0 0 0;
  margin-top: 4px;
  transition: 0.2s;
}
.popup-load-more:hover {
  color: #374151;
  text-decoration: underline;
}

.popup-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}
.popup-platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 9999px;
  padding: 7px 15px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.popup-platform:hover {
  border-color: #111827;
  color: #111827;
  background: #f9fafb;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.popup-platform:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.popup-platform svg {
  flex-shrink: 0;
  display: block;
}

.popup-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.popup-actions .btn-ghost-market {
  flex: 1;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1.5px solid #d1d5db;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  background: #fff;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}
.popup-actions .btn-ghost-market:hover {
  border-color: #111827;
  color: #111827;
  background: #f9fafb;
}
.popup-actions .btn-primary-market {
  flex: 1;
  padding: 8px 14px;
  border-radius: 9999px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--popup-accent, #111827);
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}
.popup-actions .btn-primary-market:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ─── Use It Mini Popup ─── */

.useit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.useit-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.useit-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 1px 3px rgba(0,0,0,0.06);
  width: min(380px, 88vw);
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s ease;
  display: none;
  text-align: center;
}
.useit-card.active {
  transform: translateY(0) scale(1);
  display: block;
}

.useit-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
  border-radius: 50%;
  transition: 0.2s;
  line-height: 1;
}
.useit-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.useit-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}
.useit-icon {
  font-size: 2rem;
}
.useit-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}

.useit-prompt {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 1.1rem 0;
}

.useit-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.useit-platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 9999px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.useit-platform:hover {
  border-color: #111827;
  color: #111827;
  background: #f9fafb;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.useit-platform:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.useit-platform svg {
  flex-shrink: 0;
  display: block;
}
