/**
 * Pairove Safety v2.0.0 Styles
 */
:root {
  --psa-primary: #5F259F;
  --psa-pink: #EC4899;
  --psa-success: #10B981;
  --psa-danger: #EF4444;
  --psa-warning: #F59E0B;
  --psa-text: #1A1A2E;
  --psa-muted: #6B7280;
  --psa-border: #E5E7EB;
  --psa-bg-alt: #FAFAFB;
  --psa-radius: 16px;
  --psa-radius-lg: 24px;
  --psa-shadow: 0 4px 20px rgba(95, 37, 159, 0.10);
  --psa-shadow-lg: 0 20px 60px rgba(95, 37, 159, 0.15);
}

.pairove-verify-wrapper, .pairove-safety-center, .pairove-verify-done, .pairove-verify-pending {
  max-width: 640px; margin: 40px auto; padding: 32px 24px;
  background: #fff; border-radius: var(--psa-radius-lg);
  box-shadow: var(--psa-shadow-lg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--psa-text);
}

/* INTRO */
.ps-intro { text-align: center; }
.ps-hero-icon { font-size: 72px; margin-bottom: 16px; }
.ps-intro h1 { margin: 0 0 10px; font-size: 32px; font-weight: 800;
  background: linear-gradient(135deg, var(--psa-primary), var(--psa-pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.ps-subtitle { color: var(--psa-muted); font-size: 16px; margin: 0 0 30px; }

.ps-how-it-works {
  background: var(--psa-bg-alt); border-radius: var(--psa-radius);
  padding: 24px; margin: 24px 0; text-align: left;
}
.ps-how-it-works h3 { margin: 0 0 16px; color: var(--psa-primary); font-size: 18px; }
.ps-steps { display: flex; flex-direction: column; gap: 14px; }
.ps-step { display: flex; gap: 14px; align-items: flex-start; }
.ps-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--psa-primary), var(--psa-pink));
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px;
}
.ps-step > div:last-child { line-height: 1.4; }
.ps-step small { color: var(--psa-muted); }

.ps-tips { background: #FEF3C7; border-radius: var(--psa-radius); padding: 20px; margin: 20px 0; text-align: left; }
.ps-tips h4 { margin: 0 0 10px; color: #78350F; }
.ps-tips ul { margin: 0; padding-left: 0; list-style: none; }
.ps-tips li { padding: 4px 0; font-size: 14px; }

.ps-privacy {
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
  border: 1.5px solid var(--psa-primary); border-radius: var(--psa-radius);
  padding: 14px 18px; font-size: 13px; margin: 20px 0; text-align: left;
}

/* SESSION */
.ps-session { text-align: center; }
.ps-session-header { margin-bottom: 20px; }
.ps-pose-progress { color: var(--psa-muted); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.ps-pose-dots { display: flex; gap: 8px; justify-content: center; }
.ps-pose-dot {
  width: 28px; height: 6px; border-radius: 3px; background: var(--psa-border);
  transition: all 0.3s;
}
.ps-pose-dot.active { background: var(--psa-primary); width: 48px; }
.ps-pose-dot.done { background: var(--psa-success); }

.ps-pose-instruction {
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
  border-radius: var(--psa-radius); padding: 24px; margin-bottom: 20px;
  border: 2px solid var(--psa-primary);
}
.ps-pose-emoji { font-size: 72px; margin-bottom: 10px; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.ps-pose-instruction h2 { margin: 0 0 8px; color: var(--psa-primary); font-size: 22px; }
.ps-pose-instruction p { margin: 0; color: var(--psa-muted); font-size: 14px; }

.ps-camera-frame {
  position: relative; width: 100%; max-width: 380px; aspect-ratio: 1;
  margin: 0 auto 20px; border-radius: 50%; overflow: hidden;
  background: #000; border: 4px solid var(--psa-primary);
  box-shadow: 0 8px 30px rgba(95, 37, 159, 0.3);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ps-camera-frame.ps-flash {
  border-color: var(--psa-success); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.3);
}
#ps-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.ps-camera-overlay {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.ps-face-guide {
  width: 70%; height: 70%; border: 3px dashed rgba(255, 255, 255, 0.6);
  border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; transform: scale(1.02); }
}
.ps-countdown {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 100px; font-weight: 800; color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  animation: countdownPulse 1s ease-in-out;
}
@keyframes countdownPulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.ps-capture-controls { display: flex; gap: 10px; justify-content: center; }

/* SUBMITTING */
.ps-submitting { text-align: center; padding: 60px 0; }
.ps-spinner {
  width: 50px; height: 50px; border: 4px solid var(--psa-border);
  border-top-color: var(--psa-primary); border-radius: 50%;
  margin: 0 auto 20px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* SUCCESS */
.ps-success { text-align: center; padding: 40px 0; }
.ps-success-icon { font-size: 80px; margin-bottom: 16px; }
.ps-success h2 { color: var(--psa-success); margin: 0 0 10px; }

/* ERROR */
.ps-error { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999999; }
.ps-error-box {
  background: var(--psa-danger); color: #fff;
  padding: 14px 20px; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

/* DONE / PENDING */
.pairove-verify-done, .pairove-verify-pending { text-align: center; padding: 60px 24px; }
.ps-badge-big { font-size: 80px; margin-bottom: 16px; }
.pairove-verify-done h2 { color: var(--psa-success); margin: 0 0 10px; }
.pairove-verify-pending h2 { color: var(--psa-warning); margin: 0 0 10px; }

/* BUTTONS */
.ps-btn {
  display: inline-block; padding: 14px 28px;
  background: linear-gradient(135deg, var(--psa-primary), #8B5CF6);
  color: #fff !important; border: none; border-radius: 50px;
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s; text-align: center;
  box-shadow: 0 4px 14px rgba(95, 37, 159, 0.25);
}
.ps-btn:hover:not(:disabled) {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(95, 37, 159, 0.35);
  color: #fff !important;
}
.ps-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ps-btn-lg { padding: 16px 36px; font-size: 16px; }
.ps-btn-secondary {
  background: #fff; color: var(--psa-text) !important;
  border: 2px solid var(--psa-border); box-shadow: none;
}
.ps-btn-secondary:hover { border-color: var(--psa-primary); color: var(--psa-primary) !important; }

/* SAFETY CENTER */
.pairove-safety-center { max-width: 800px; }
.ps-sc-header { text-align: center; margin-bottom: 30px; }
.ps-sc-header h1 { margin: 0 0 8px; color: var(--psa-primary); font-size: 32px; }
.ps-sc-header p { color: var(--psa-muted); font-size: 15px; margin: 0; }

.ps-sc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  margin-bottom: 40px;
}
.ps-sc-card {
  background: var(--psa-bg-alt); padding: 24px; border-radius: var(--psa-radius);
  text-align: center; transition: transform 0.2s, box-shadow 0.2s;
}
.ps-sc-card:hover { transform: translateY(-4px); box-shadow: var(--psa-shadow); }
.ps-sc-icon { font-size: 40px; margin-bottom: 10px; }
.ps-sc-card h3 { margin: 0 0 8px; color: var(--psa-primary); font-size: 17px; }
.ps-sc-card p { margin: 0 0 14px; color: var(--psa-muted); font-size: 13px; line-height: 1.4; }
.ps-sc-card .ps-btn { font-size: 13px; padding: 10px 20px; }

.ps-sc-tips h2 { color: var(--psa-primary); margin: 0 0 20px; font-size: 24px; }
.ps-sc-tip-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 40px; }
.ps-tip { background: #fff; border: 1.5px solid var(--psa-border); padding: 16px; border-radius: var(--psa-radius); }
.ps-tip strong { display: block; margin-bottom: 6px; color: var(--psa-text); font-size: 15px; }
.ps-tip p { margin: 0; color: var(--psa-muted); font-size: 13px; line-height: 1.4; }

.ps-sc-helplines { background: linear-gradient(135deg, #faf5ff, #fdf2f8); padding: 24px; border-radius: var(--psa-radius); margin-bottom: 30px; }
.ps-sc-helplines h2 { color: var(--psa-primary); margin: 0 0 8px; font-size: 22px; }
.ps-sc-helplines p { margin: 0 0 20px; color: var(--psa-muted); font-size: 14px; }
.ps-helpline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ps-helpline { background: #fff; padding: 14px; border-radius: 12px; border: 1px solid var(--psa-border); }
.ps-helpline strong { display: block; color: var(--psa-primary); font-size: 14px; margin-bottom: 4px; }
.ps-helpline-number { font-size: 18px; font-weight: 700; color: var(--psa-text); margin: 4px 0; font-family: 'Courier New', monospace; }
.ps-helpline small { color: var(--psa-muted); font-size: 12px; }

.ps-sc-guidelines { background: var(--psa-bg-alt); padding: 24px; border-radius: var(--psa-radius); }
.ps-sc-guidelines h2 { color: var(--psa-primary); margin: 0 0 16px; font-size: 22px; }
.ps-sc-guidelines ul { margin: 0; padding-left: 0; list-style: none; }
.ps-sc-guidelines li { padding: 6px 0; font-size: 14px; }

/* REPORT FORM */
.pairove-report-form h2 { color: var(--psa-primary); margin: 0 0 8px; }
.ps-report-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 20px 0; }
.ps-report-cat { position: relative; cursor: pointer; }
.ps-report-cat input { position: absolute; opacity: 0; }
.ps-report-cat-card {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1.5px solid var(--psa-border); border-radius: var(--psa-radius);
  transition: all 0.2s; background: #fff;
}
.ps-report-cat input:checked + .ps-report-cat-card {
  border-color: var(--psa-primary); background: rgba(95, 37, 159, 0.05);
}
.ps-report-cat-icon { font-size: 24px; }
.ps-report-cat-label { font-size: 13px; font-weight: 600; }
.ps-report-desc {
  width: 100%; padding: 12px; border: 1.5px solid var(--psa-border);
  border-radius: var(--psa-radius); font-family: inherit; font-size: 14px;
  resize: vertical; min-height: 80px; margin-bottom: 16px; box-sizing: border-box;
}
.ps-success-box {
  background: var(--psa-success); color: #fff; padding: 20px;
  border-radius: var(--psa-radius); text-align: center; font-weight: 600;
}

/* VERIFIED BADGE */
.pairove-verified-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #1E40AF);
  color: #fff; font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
  vertical-align: middle; margin-left: 4px;
}

/* MOBILE */
@media (max-width: 600px) {
  .pairove-verify-wrapper, .pairove-safety-center { margin: 0; border-radius: 0; box-shadow: none; min-height: 100vh; padding: 24px 18px; }
  .ps-camera-frame { max-width: 300px; }
  .ps-pose-emoji { font-size: 56px; }
  .ps-report-categories { grid-template-columns: 1fr; }
}
