/* ═══════════════════════════════════════════════════════════════════════════
   YTCut post-download review popup. Self-contained, dark, premium.
   3 faces (sad/neutral/happy = 1/3/5★) → written review / private feedback →
   thank-you. Prefixed .ytr-* so it never collides with the app styles.
   ═══════════════════════════════════════════════════════════════════════════ */

.ytr-backdrop {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(6, 9, 16, 0.74);
  opacity: 0; transition: opacity 0.22s ease;
}
.ytr-backdrop.is-open { opacity: 1; }

.ytr-sheet {
  position: relative; width: 100%; max-width: 452px;
  max-height: calc(100dvh - 36px); overflow-y: auto;
  background: linear-gradient(180deg, #19203354 0%, #131a2b 42%);
  background-color: #131a2b;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.14), 0 30px 70px -24px rgba(0, 0, 0, 0.8);
  padding: 30px 28px 26px;
  transform: translateY(14px) scale(0.97); opacity: 0;
  transition: transform 0.34s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.28s ease;
  text-align: center; color: #f3f5fa;
}
.ytr-backdrop.is-open .ytr-sheet { transform: translateY(0) scale(1); opacity: 1; }

.ytr-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05); border: none; border-radius: 10px;
  color: #8a93a8; font-size: 15px; cursor: pointer; transition: all 0.16s;
}
.ytr-close:hover { background: rgba(255, 255, 255, 0.1); color: #f3f5fa; }

.ytr-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 6px; }
.ytr-sub { font-size: 14px; line-height: 1.5; color: #9aa3b8; margin: 0 0 22px; }

/* ── Step: rate (3 faces) ─────────────────────────────────────────────── */
.ytr-faces { display: flex; gap: 11px; justify-content: center; margin-bottom: 14px; }
.ytr-face {
  flex: 1; max-width: 122px; display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 16px 6px; border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.03);
  color: #8b93a7; cursor: pointer; font-family: inherit;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s, background 0.16s, color 0.16s;
}
.ytr-face:hover { transform: translateY(-4px); }
.ytr-face:hover .ytr-face-ic { transform: scale(1.1); }
.ytr-face-ic { transition: transform 0.16s; }
.ytr-face-ic svg { width: 42px; height: 42px; display: block; }
.ytr-face-label { font-size: 12.5px; font-weight: 600; }
.ytr-face-sad:hover     { border-color: #f59e0b; color: #f59e0b; background: rgba(245, 158, 11, 0.09); box-shadow: 0 14px 30px -16px rgba(245, 158, 11, 0.6); }
.ytr-face-neutral:hover { border-color: #7c8698; color: #aab3c5; background: rgba(148, 163, 184, 0.09); box-shadow: 0 14px 30px -16px rgba(148, 163, 184, 0.5); }
.ytr-face-happy:hover   { border-color: #10b981; color: #10b981; background: rgba(16, 185, 129, 0.1);  box-shadow: 0 14px 30px -16px rgba(16, 185, 129, 0.6); }

.ytr-skip {
  background: none; border: none; color: #737d92; font-size: 13px; font-family: inherit;
  cursor: pointer; padding: 8px; margin-top: 4px; transition: color 0.16s;
}
.ytr-skip:hover { color: #aab3c5; }

/* ── Step: review / improve ───────────────────────────────────────────── */
.ytr-badge {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff;
}
.ytr-badge--love { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 14px 30px -12px rgba(245, 158, 11, 0.65); }
.ytr-badge--improve { background: linear-gradient(135deg, #7c5cff, #6d4bff); box-shadow: 0 14px 30px -12px rgba(124, 92, 255, 0.65); }
.ytr-badge--thanks { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 14px 30px -12px rgba(16, 185, 129, 0.6); }

.ytr-textarea, .ytr-input {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14px; color: #f3f5fa;
  background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 12px 14px; transition: border-color 0.16s, box-shadow 0.16s;
}
.ytr-textarea { min-height: 92px; resize: vertical; margin-bottom: 10px; line-height: 1.5; }
.ytr-input { margin-bottom: 12px; }
.ytr-textarea::placeholder, .ytr-input::placeholder { color: #6b7488; }
.ytr-textarea:focus, .ytr-input:focus { outline: none; border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18); }

.ytr-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.ytr-chip {
  font-family: inherit; font-size: 12.5px; font-weight: 500; color: #aab3c5; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px; padding: 7px 13px; transition: all 0.15s;
}
.ytr-chip:hover { border-color: rgba(124, 92, 255, 0.5); color: #f3f5fa; }
.ytr-chip.is-on { background: #7c5cff; border-color: #7c5cff; color: #fff; }

.ytr-btn {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14.5px; font-weight: 700;
  color: #fff; border: none; border-radius: 12px; padding: 13px 20px; cursor: pointer;
  background: linear-gradient(135deg, #7c5cff, #6d4bff);
  box-shadow: 0 12px 26px -12px rgba(124, 92, 255, 0.7); transition: transform 0.14s, box-shadow 0.14s, opacity 0.14s;
}
.ytr-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(124, 92, 255, 0.8); }
.ytr-btn:active { transform: translateY(0); }
.ytr-btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.ytr-btn--love { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 12px 26px -12px rgba(245, 158, 11, 0.7); }
.ytr-btn--love:hover { box-shadow: 0 16px 32px -12px rgba(245, 158, 11, 0.85); }
.ytr-linkbtn { display: block; width: 100%; background: none; border: none; color: #737d92; font-family: inherit; font-size: 13px; cursor: pointer; padding: 12px 0 2px; transition: color 0.16s; }
.ytr-linkbtn:hover { color: #aab3c5; }

/* ── Step: thanks (success ring + check draw) ─────────────────────────── */
.ytr-success-ring { display: block; margin: 4px auto 6px; }
.ytr-success-ring circle { stroke: #10b981; stroke-width: 4; fill: none; stroke-dasharray: 166; stroke-dashoffset: 166; animation: ytr-ring 0.5s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.ytr-success-ring path { stroke: #10b981; stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: ytr-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.42s forwards; }
@keyframes ytr-ring  { to { stroke-dashoffset: 0; } }
@keyframes ytr-check { to { stroke-dashoffset: 0; } }

.ytr-steps > div { display: none; }
.ytr-steps > div.is-active { display: block; animation: ytr-stepin 0.26s ease; }
@keyframes ytr-stepin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 480px) {
  .ytr-backdrop { align-items: flex-end; padding: 0; }
  .ytr-sheet { max-width: 100%; border-radius: 22px 22px 0 0; padding: 26px 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ytr-backdrop, .ytr-sheet, .ytr-face, .ytr-btn, .ytr-steps > div { transition: none; animation: none; }
  .ytr-success-ring circle, .ytr-success-ring path { animation: none; stroke-dashoffset: 0; }
}

/* ═══ Wall of Love — reviews (server-injected; matches .use-card) ═══ */
.rev-summary {
  display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  background: var(--bg-card, rgba(20,27,45,0.65));
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: var(--radius-lg, 18px); backdrop-filter: blur(12px);
  padding: 1.5rem 2rem; margin: 0 auto 1.6rem; max-width: 440px; flex-wrap: wrap;
}
.rev-summary-score { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--text-main, #f8fafc); }
.rev-summary-meta { text-align: left; }
.rev-summary-stars { color: #fbbf24; font-size: 1.05rem; letter-spacing: 2px; margin-bottom: 0.3rem; }
.rev-summary-stars .rev-star-empty { color: rgba(255,255,255,0.18); }
.rev-summary-count { font-size: 0.9rem; color: var(--text-muted, #94a3b8); }
.rev-summary-count strong { color: var(--text-main, #f8fafc); font-weight: 700; }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.4rem; }
.rev-card {
  background: var(--bg-card, rgba(20,27,45,0.65));
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: var(--radius-lg, 18px); backdrop-filter: blur(12px);
  padding: 1.5rem 1.7rem; margin: 0; display: flex; flex-direction: column; gap: 0.7rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.rev-card:hover { border-color: rgba(6,182,212,0.3); transform: translateY(-3px); }
.rev-card-stars { color: #fbbf24; font-size: 0.9rem; letter-spacing: 1.5px; }
.rev-card-stars .rev-star-empty { color: rgba(255,255,255,0.18); }
.rev-card-text { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--text-main, #f8fafc); font-style: normal; font-weight: 500; }
.rev-card-author { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.3rem; }
.rev-card-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(6,182,212,0.2));
  border: 1px solid rgba(255,255,255,0.1); border-radius: 50%;
  font-size: 0.85rem; font-weight: 700; color: var(--text-main, #f8fafc);
}
.rev-card-name-group { display: flex; align-items: center; gap: 0.5rem; }
.rev-card-name { font-size: 0.85rem; font-weight: 600; color: var(--text-muted, #94a3b8); }
.rev-card-flag { border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
@media (max-width: 560px) {
  .rev-summary { gap: 0.85rem; padding: 1.25rem 1.5rem; }
  .rev-summary-score { font-size: 2.5rem; }
  .rev-summary-meta { text-align: center; }
}
