/* ── Year in Review — in-app modal + public share card ────────────────────── */

/* ── In-App Modal ── */
.review-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 25, 0.75);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.review-modal-overlay.open {
  display: flex;
}
.review-modal {
  background: linear-gradient(160deg, #1a0b2e 0%, #16213e 60%, #0f3460 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 80px rgba(139, 92, 246, 0.25), 0 24px 64px rgba(0, 0, 0, 0.5);
  padding: 32px 28px 24px;
  color: #f1f0f7;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
}
.review-modal::-webkit-scrollbar { width: 4px; }
.review-modal::-webkit-scrollbar-track { background: transparent; }
.review-modal::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.4); border-radius: 4px; }

.review-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #c4b5fd;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.review-close-btn:hover { background: rgba(255,255,255,0.15); }

.review-year-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c4b5fd;
  margin-bottom: 8px;
}
.review-headline {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #e879f9 0%, #fb923c 60%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.review-subline {
  font-size: 0.9rem;
  color: #a78bfa;
  margin-bottom: 24px;
}

/* Loading / error states */
.review-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: #c4b5fd;
  font-size: 0.9rem;
}
.review-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: review-spin 0.8s linear infinite;
}
@keyframes review-spin { to { transform: rotate(360deg); } }

.review-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  padding: 16px;
  color: #fca5a5;
  font-size: 0.88rem;
  text-align: center;
  margin: 20px 0;
}

/* Stat grid */
.review-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.review-stat-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s;
}
.review-stat-card:hover { background: rgba(255, 255, 255, 0.09); }
.review-stat-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.review-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}
.review-stat-label {
  font-size: 0.76rem;
  color: #a78bfa;
  font-weight: 500;
  line-height: 1.3;
}

/* Highlight box */
.review-highlight {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.18) 0%, rgba(250, 204, 21, 0.12) 100%);
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.review-highlight-icon { font-size: 1.4rem; flex-shrink: 0; }
.review-highlight-body {}
.review-highlight-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fb923c;
  font-weight: 700;
  margin-bottom: 3px;
}
.review-highlight-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.review-highlight-meta {
  font-size: 0.8rem;
  color: #fcd34d;
  margin-top: 2px;
}

/* Share actions */
.review-share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.review-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}
.review-btn:active { transform: scale(0.97); }
.review-btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  flex: 1;
  justify-content: center;
  min-width: 120px;
}
.review-btn-primary:hover { opacity: 0.9; }
.review-btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.review-btn-whatsapp:hover { opacity: 0.88; }
.review-btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #c4b5fd;
  border: 1px solid rgba(255,255,255,0.12);
}
.review-btn-ghost:hover { background: rgba(255,255,255,0.13); }

/* Toast (shared with app — uses existing showToast if present, this is fallback) */
.review-toast-inline {
  font-size: 0.82rem;
  color: #86efac;
  margin-top: 8px;
  min-height: 18px;
  text-align: center;
}

/* ── Public Share Card (review.html standalone) ── */
.yr-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #12052e 0%, #16213e 55%, #0c2a50 100%);
  color: #f1f0f7;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 48px;
}
.yr-topbar {
  width: 100%;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.yr-logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #7c3aed 0%, #e879f9 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.yr-logo-name {
  font-weight: 800;
  font-size: 1rem;
  background: linear-gradient(135deg, #c4b5fd 0%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.yr-card {
  width: min(480px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 24px;
  padding: 36px 28px 28px;
  margin-top: 16px;
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.15);
}
.yr-year-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a78bfa;
  font-weight: 700;
  margin-bottom: 6px;
}
.yr-name-headline {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #e879f9 0%, #fb923c 55%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.yr-subline {
  font-size: 0.9rem;
  color: #a78bfa;
  margin-bottom: 28px;
}
.yr-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.yr-stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 16px 14px;
}
.yr-stat-icon { font-size: 1.4rem; margin-bottom: 6px; }
.yr-stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.yr-stat-lbl {
  font-size: 0.75rem;
  color: #a78bfa;
  font-weight: 500;
  line-height: 1.3;
}
.yr-highlight {
  background: linear-gradient(135deg, rgba(251,146,60,0.15), rgba(250,204,21,0.1));
  border: 1px solid rgba(251,146,60,0.3);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.yr-highlight-icon { font-size: 1.3rem; flex-shrink: 0; }
.yr-highlight-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fb923c;
  font-weight: 700;
  margin-bottom: 3px;
}
.yr-highlight-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}
.yr-highlight-stars {
  font-size: 0.8rem;
  color: #fcd34d;
  margin-top: 2px;
}
.yr-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 20px;
}
.yr-cta {
  text-align: center;
  margin-bottom: 20px;
}
.yr-cta-text {
  font-size: 0.95rem;
  color: #c4b5fd;
  margin-bottom: 12px;
  font-weight: 500;
}
.yr-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 12px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}
.yr-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.yr-footer {
  text-align: center;
  font-size: 0.75rem;
  color: #6b5e8a;
  margin-top: 12px;
  line-height: 1.6;
}
.yr-error-state {
  text-align: center;
  padding: 60px 24px;
  color: #a78bfa;
}
.yr-error-state h2 { font-size: 1.2rem; color: #e2d9f3; margin-bottom: 8px; }
.yr-error-state p { font-size: 0.88rem; }

/* Responsive */
@media (max-width: 380px) {
  .review-stats-grid, .yr-stats { grid-template-columns: 1fr 1fr; }
  .review-modal { padding: 24px 18px 20px; }
  .yr-card { padding: 28px 18px 20px; }
  .yr-name-headline { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .review-spinner { animation: none; opacity: 0.6; }
}
