/* ───────────────  Screen 3 — Results / Clips  ─────────────── */
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-2);
}
.results-head__title { display: flex; align-items: center; gap: var(--sp-3); }
.results-head h1 { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 var(--sp-2);
  border-radius: 999px; background: var(--violet-dim); color: var(--text-violet);
  font-size: 12.5px; font-weight: 600; font-family: var(--font-display);
}
.results-head__actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }
.results-head__actions .btn { min-height: 44px; padding: 0 var(--sp-4); font-size: 14px; }
.results-head__sort { display: flex; align-items: center; gap: var(--sp-2); }
.results-head__sort label { font-size: 13px; color: var(--text-muted); }
.results-head__sort .select { min-height: 44px; width: auto; padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
.results-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: var(--sp-8); }

/* Trending CTA */
.trending-cta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--violet-dim), transparent 80%);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.trending-cta:hover { border-color: var(--border-focus); box-shadow: var(--violet-glow); }
.trending-cta__icon { font-size: 20px; flex-shrink: 0; }
.trending-cta__text { flex: 1; font-size: 14px; color: var(--text-secondary); }
.trending-cta__text strong { color: var(--text-primary); font-weight: 600; }
.trending-cta__go { flex-shrink: 0; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text-violet); }

/* Grid */
.clip-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }

/* Clip card */
.clip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.clip-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--violet-glow); }

.clip-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
}
.clip-thumb video, .clip-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-thumb__placeholder { color: var(--text-muted); }
.clip-thumb__play {
  position: relative;
  z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(11, 13, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid; place-items: center; color: #fff;
  backdrop-filter: blur(4px);
  transition: all 0.18s ease;
}
.clip-thumb:hover .clip-thumb__play { background: var(--violet); border-color: var(--violet); }
.clip-thumb__score {
  position: absolute; top: var(--sp-3); right: var(--sp-3); z-index: 3;
  display: inline-flex; align-items: center; gap: 3px;
  height: 24px; padding: 0 var(--sp-2);
  border-radius: 999px; font-size: 12px; font-weight: 700; font-family: var(--font-display);
}
.clip-thumb__score--high { background: rgba(108, 92, 231, 0.9); color: #fff; }
.clip-thumb__score--mid  { background: rgba(245, 158, 11, 0.9); color: #1a1300; }
.clip-thumb__score--low  { background: rgba(82, 88, 112, 0.85); color: var(--text-primary); }
.clip-thumb__dur {
  position: absolute; bottom: var(--sp-3); left: var(--sp-3); z-index: 3;
  height: 22px; padding: 0 var(--sp-2);
  border-radius: var(--radius-sm); background: rgba(8, 10, 20, 0.78); color: #fff;
  font-size: 12px; font-family: var(--font-mono); display: inline-flex; align-items: center;
}

.clip-body { padding: var(--sp-4) var(--sp-5); flex: 1; }
.clip-source { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.clip-source svg { color: var(--violet-alt); flex-shrink: 0; }
.clip-source span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-title {
  font-family: var(--font-display); font-weight: 500; font-size: 14px; line-height: 1.35;
  margin-bottom: var(--sp-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clip-excerpt-row { display: flex; align-items: flex-start; gap: var(--sp-2); }
.clip-excerpt {
  flex: 1; min-width: 0;
  font-size: 12px; color: var(--text-secondary); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.clip-excerpt__copy { width: 26px; height: 26px; opacity: 0; }
.clip-card:hover .clip-excerpt__copy, .clip-excerpt__copy:focus-visible { opacity: 1; }
.clip-excerpt__copy svg { width: 13px; height: 13px; }
.clip-tags { margin-top: var(--sp-2); font-size: 11px; color: var(--text-violet); font-family: var(--font-mono); }

.clip-actions { display: flex; border-top: 1px solid var(--border-subtle); }
.clip-actions__btn {
  flex: 1; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-size: 13px; color: var(--text-secondary);
  transition: all 0.18s ease;
}
.clip-actions__btn:first-child { border-right: 1px solid var(--border-subtle); }
.clip-actions__btn--download:hover { color: var(--success); }
.clip-actions__btn--preview:hover { color: var(--violet-alt); }

/* Preview dialog */
.preview-dialog {
  width: min(860px, 100vw);
  max-width: 100vw;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0;
  overflow: hidden;
}
.preview-dialog::backdrop { background: rgba(0, 0, 0, 0.85); }
.preview-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.preview-dialog__title { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.preview-dialog__close { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text-secondary); border-radius: var(--radius-md); font-size: 20px; }
.preview-dialog__close:hover { color: var(--text-primary); background: var(--bg-hover); }
.preview-dialog video { width: 100%; max-height: 78vh; background: #000; display: block; }

@media (min-width: 481px) {
  .clip-grid { grid-template-columns: repeat(2, 1fr); }
  .results-head h1 { font-size: 28px; }
}
@media (min-width: 769px) {
  .clip-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .preview-dialog { width: 100vw; height: 100vh; max-height: 100vh; border: none; border-radius: 0; }
  .preview-dialog video { max-height: calc(100vh - 60px); }
}
