/* css/stimulus_player.css */
/* =============================================================================
   STIMULUS PLAYER: 7-Stage Immersive Video Experience
   LIGHT PASTEL THEME - Matching rewire-stimulus-v5.html
   =============================================================================
   V5 UPDATES:
   - Added body map image styles (.stimulus-body-image)
   - Added coordinate-based spot positioning support
   - Enhanced responsive styles for body map
   
   V6 UPDATES (UI REDESIGN):
   - Fixed video container scrolling issue
   - Improved body map image blending with pastel background
   - Added cleaner copy icon styles for share stage
   
   V7 UPDATES (UI REDESIGN):
   - Updated .stimulus-icon to support both emoji and SVG icons
   - Added .stimulus-question-block and .stimulus-question-label for Stage 6
   - Added textarea styles for Stage 6 values/action inputs
   - Removed checklist emoji icon styles (using text only)
   ============================================================================= */

/* =============================================================================
   CSS VARIABLES - Light Theme Palette
   ============================================================================= */

:root {
  /* Light theme colors */
  --stimulus-bg: linear-gradient(155deg, #f0e4e0 0%, #e8e0f0 50%, #e0e8f4 100%);
  --stimulus-screen-bg: linear-gradient(180deg, #fafafa 0%, #f8f6fa 100%);
  --stimulus-card-bg: rgba(255, 255, 255, 0.85);
  --stimulus-card-solid: #ffffff;
  --stimulus-text: #1a1a1a;
  --stimulus-text-secondary: #555555;
  --stimulus-text-muted: #888888;
  --stimulus-green: #6aaa6a;
  --stimulus-green-light: #e8f5e8;
  --stimulus-green-hover: #5a9a5a;
  --stimulus-border: rgba(0, 0, 0, 0.06);
  --stimulus-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --stimulus-shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* =============================================================================
   CONTAINER - Full Screen Light Background
   ============================================================================= */

.stimulus-player-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--stimulus-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* V9 FIX: Prevent container from being dragged/moved */
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.stimulus-player-container.hidden {
  display: none;
}

/* Inner container for content centering */
/* V8 FIX: Added border-radius for curved edges */
/* V9 FIX: Added positioning constraints to prevent card from being moveable */
.stimulus-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  background: var(--stimulus-screen-bg);
  overflow: hidden;
  border-radius: 24px;
  /* V9 FIX: Prevent card from being dragged/moved */
  position: relative;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* =============================================================================
   STAGE LAYOUT
   ============================================================================= */

.stimulus-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stimulus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  flex-shrink: 0;
}

.stimulus-header-video {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0.8), transparent);
  padding: 16px 20px;
}

.stimulus-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* V9 FIX: Prevent content from causing unwanted scroll/drag behavior */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.stimulus-content::-webkit-scrollbar {
  display: none;
}

.stimulus-content-center {
  justify-content: center;
}

.stimulus-footer {
  padding: 16px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(248, 228, 220, 0.3) 50%, rgba(220, 232, 248, 0.4) 100%);
}

.stimulus-footer-video {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 16px 24px 40px;
  background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0.8), transparent);
}

/* =============================================================================
   PROGRESS BAR - Top of Screen
   ============================================================================= */

.stimulus-progress {
  width: 100%;
  padding: 0 20px;
}

.stimulus-progress-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.stimulus-progress-fill {
  height: 100%;
  background: var(--stimulus-green);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.stimulus-progress-text {
  color: var(--stimulus-text-muted);
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}

/* =============================================================================
   BUTTONS - Light Theme
   ============================================================================= */

.stimulus-close-btn,
.stimulus-back-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--stimulus-card-solid);
  border: 1px solid var(--stimulus-border);
  color: var(--stimulus-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--stimulus-shadow);
}

.stimulus-close-btn:hover,
.stimulus-back-btn:hover {
  background: #f5f5f5;
  transform: scale(1.05);
}

.stimulus-close-btn svg,
.stimulus-back-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--stimulus-text);
  stroke-width: 2;
  fill: none;
}

/* Primary Button - Dark */
.stimulus-btn {
  padding: 16px 32px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  font-family: inherit;
}

.stimulus-btn-primary {
  background: var(--stimulus-text);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stimulus-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stimulus-btn-primary:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary Button - Outlined */
.stimulus-btn-secondary {
  background: var(--stimulus-card-solid);
  color: var(--stimulus-text);
  border: 1px solid var(--stimulus-border);
}

.stimulus-btn-secondary:hover {
  background: #f8f8f8;
  border-color: rgba(0, 0, 0, 0.1);
}

/* Green Button - For Chills */
.stimulus-btn-green {
  background: var(--stimulus-green);
  color: white;
  box-shadow: 0 4px 12px rgba(106, 170, 106, 0.3);
}

.stimulus-btn-green:hover {
  background: var(--stimulus-green-hover);
  box-shadow: 0 8px 24px rgba(106, 170, 106, 0.4);
}

.stimulus-btn-large {
  padding: 18px 48px;
  font-size: 17px;
  width: 100%;
}

/* Text Link Button */
.stimulus-btn-text {
  background: none;
  border: none;
  color: var(--stimulus-text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stimulus-btn-text:hover {
  color: var(--stimulus-text);
}

/* =============================================================================
   TYPOGRAPHY - Light Theme
   V7: Updated .stimulus-icon to support both emoji and SVG icons
   ============================================================================= */

/* V7: Icon container - supports both emoji text and SVG elements */
.stimulus-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stimulus-text);
}

/* V7: SVG icons inside .stimulus-icon */
.stimulus-icon svg {
  width: 56px;
  height: 56px;
  stroke: var(--stimulus-text);
  stroke-width: 1.5;
  fill: none;
}

.stimulus-icon-breathing {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.stimulus-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--stimulus-text);
  text-align: center;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.stimulus-subtitle {
  font-size: 15px;
  color: var(--stimulus-text-secondary);
  text-align: center;
  margin: 0 0 24px 0;
  max-width: 340px;
  line-height: 1.5;
}

.stimulus-section {
  width: 100%;
  max-width: 400px;
  margin-bottom: 24px;
}

.stimulus-section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--stimulus-text);
  margin: 0 0 14px 0;
  text-align: center;
}

.stimulus-hint {
  font-size: 13px;
  color: var(--stimulus-text-muted);
  text-align: center;
  margin: 8px 0;
}

/* =============================================================================
   V8 FIX: Card Wrapper for Stages 4, 5, 6
   Provides curved edges and proper spacing for content cards
   V9 FIX: Added touch constraints to prevent card from being moveable
   ============================================================================= */

.stimulus-card-wrapper {
  background: white;
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  /* V9 FIX: Prevent card from being dragged/moved */
  position: relative;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

/* =============================================================================
   STAGE 1: INTRO - Checklist Card
   V7: Removed emoji icons from checklist items
   V9 FIX: Added touch constraints to prevent card from being moveable
   ============================================================================= */

.stimulus-intro-card {
  background: var(--stimulus-card-bg);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--stimulus-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* V9 FIX: Prevent card from being dragged/moved */
  position: relative;
  touch-action: manipulation;
}

.stimulus-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stimulus-check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--stimulus-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stimulus-check-item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}

.stimulus-check-item.checked {
  background: var(--stimulus-green-light);
  border-color: var(--stimulus-green);
}

.stimulus-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.stimulus-check-item.checked .stimulus-checkbox {
  background: var(--stimulus-green);
  border-color: var(--stimulus-green);
}

.stimulus-checkbox svg {
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 3;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.stimulus-check-item.checked .stimulus-checkbox svg {
  opacity: 1;
}

/* V7: Kept for backward compatibility but no longer used */
.stimulus-check-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.stimulus-check-text {
  flex: 1;
  color: var(--stimulus-text);
  font-size: 15px;
  font-weight: 500;
}

/* =============================================================================
   STAGE 2: ABOUT CHILLS - Info Card
   V9 FIX: Added touch constraints to prevent card from being moveable
   ============================================================================= */

.stimulus-info-card {
  background: var(--stimulus-card-bg);
  border-radius: 20px;
  padding: 24px;
  max-width: 380px;
  margin-bottom: 20px;
  box-shadow: var(--stimulus-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* V9 FIX: Prevent card from being dragged/moved */
  position: relative;
  touch-action: manipulation;
}

.stimulus-info-text {
  color: var(--stimulus-text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.stimulus-info-text:last-child {
  margin-bottom: 0;
}

.stimulus-info-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.stimulus-info-list li {
  color: var(--stimulus-text-secondary);
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stimulus-info-list li::before {
  content: "•";
  color: var(--stimulus-green);
  font-weight: bold;
}

/* Chills Button Preview */
.stimulus-chills-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--stimulus-green-light);
  border: 2px solid var(--stimulus-green);
  border-radius: 50px;
  color: var(--stimulus-green);
  font-weight: 600;
  font-size: 15px;
  margin-top: 16px;
}

.stimulus-chills-preview svg {
  width: 18px;
  height: 18px;
  fill: var(--stimulus-green);
}

/* =============================================================================
   STAGE 3: WATCH VIDEO - V6 FIX: Scrolling and overflow issues
   ============================================================================= */

.stimulus-watch-video {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  /* V6 FIX: Allow the video stage to scroll */
  overflow-y: auto;
  overflow-x: hidden;
}

.stimulus-video-wrapper {
  /* V6 FIX: Changed from flex: 1 to min-height to prevent overflow */
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 16px 160px;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  /* V6 FIX: Ensure wrapper can shrink if needed */
  flex-shrink: 0;
}

.stimulus-video-wrapper iframe,
.stimulus-video-wrapper #stimulus-youtube-player {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  box-shadow: var(--stimulus-shadow-strong);
  background: #000;
}

/* Video Title Bar - V9: Hidden */
.stimulus-video-title {
  display: none !important;
}

.stimulus-video-icon {
  display: none;
}

.stimulus-video-name {
  display: none;
}

/* Video Controls Overlay */
.stimulus-video-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 10;
  background: linear-gradient(to top, rgba(255,255,255,0.98), rgba(255,255,255,0.9), transparent);
}

/* Video Progress Bar */
.stimulus-video-progress {
  width: 100%;
  max-width: 500px;
}

.stimulus-video-progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}

.stimulus-video-progress-fill {
  height: 100%;
  background: var(--stimulus-green);
  border-radius: 3px;
  transition: width 0.25s linear;
}

.stimulus-video-chills-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.stimulus-chills-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #fbbf24;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

.stimulus-video-time {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--stimulus-text-muted);
  font-size: 12px;
  font-family: 'SF Mono', Monaco, monospace;
}

/* Chills Button - Green */
.stimulus-chills-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--stimulus-green);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(106, 170, 106, 0.35);
  font-family: inherit;
}

.stimulus-chills-btn:hover {
  background: var(--stimulus-green-hover);
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(106, 170, 106, 0.45);
}

.stimulus-chills-btn:active {
  transform: scale(0.98);
}

.stimulus-chills-btn svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Chills Animation */
.stimulus-chills-btn.recording {
  animation: pulse-green 0.6s ease-in-out;
}

@keyframes pulse-green {
  0% { transform: scale(1); box-shadow: 0 4px 16px rgba(106, 170, 106, 0.35); }
  50% { transform: scale(1.08); box-shadow: 0 8px 32px rgba(106, 170, 106, 0.6); }
  100% { transform: scale(1); box-shadow: 0 4px 16px rgba(106, 170, 106, 0.35); }
}

/* Chills Counter */
.stimulus-chills-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  font-size: 14px;
  color: var(--stimulus-text-secondary);
}

.stimulus-chills-counter svg {
  width: 16px;
  height: 16px;
  fill: #fbbf24;
}

/* Done Watching Link */
.stimulus-done-link {
  color: var(--stimulus-text-muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  margin-top: 4px;
}

.stimulus-done-link:hover {
  color: var(--stimulus-text);
}

/* =============================================================================
   STAGE 4: BODY MAP - V6 ENHANCED STYLES
   ============================================================================= */

.stimulus-body-map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.stimulus-body-outline {
  position: relative;
  width: 200px;
  height: 360px;
  margin: 0 auto 20px;
}

/* V6 FIX: Body Map Image - Better blending with pastel background */
.stimulus-body-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  /* V6: Softer appearance to blend with pastel background */
  opacity: 0.85;
  filter: contrast(0.95) brightness(1.02);
}

/* Fallback for SVG silhouette */
.stimulus-body-outline svg {
  width: 100%;
  height: 100%;
}

/* V6 FIX: Softer stroke for body outline SVG */
.stimulus-body-outline svg path {
  fill: none;
  stroke: #b0b0b0;
  stroke-width: 1.2;
  opacity: 0.8;
}

/* Body Map Spots - V5 UPDATED for percentage-based positioning */
.stimulus-body-spot {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--stimulus-green);
  border: 3px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(106, 170, 106, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
}

.stimulus-body-spot:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 4px 12px rgba(106, 170, 106, 0.6);
}

/* Spot inner glow effect */
.stimulus-body-spot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
}

/* Spot animation on add */
@keyframes spotPulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.stimulus-body-spot.new {
  animation: spotPulse 0.3s ease-out;
}

.stimulus-body-map-hint {
  font-size: 14px;
  color: var(--stimulus-text-muted);
  text-align: center;
  margin-bottom: 16px;
}

.stimulus-body-map-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stimulus-spot-counter {
  font-size: 14px;
  color: var(--stimulus-text-secondary);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 20px;
}

.stimulus-clear-btn {
  font-size: 13px;
  color: var(--stimulus-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stimulus-clear-btn:hover {
  color: var(--stimulus-text);
}

/* =============================================================================
   STAGE 5: INSIGHTS - Text Input
   ============================================================================= */

.stimulus-insights-container {
  width: 100%;
  max-width: 400px;
}

.stimulus-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.stimulus-chip {
  padding: 10px 18px;
  background: var(--stimulus-card-solid);
  border: 1px solid var(--stimulus-border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--stimulus-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.stimulus-chip:hover {
  background: #f5f5f5;
  border-color: rgba(0, 0, 0, 0.1);
}

.stimulus-chip.selected {
  background: var(--stimulus-green-light);
  border-color: var(--stimulus-green);
  color: var(--stimulus-green);
}

.stimulus-textarea {
  width: 100%;
  min-height: 140px;
  padding: 18px;
  background: var(--stimulus-card-solid);
  border: 1px solid var(--stimulus-border);
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--stimulus-text);
  resize: none;
  outline: none;
  line-height: 1.6;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stimulus-textarea:focus {
  border-color: var(--stimulus-green);
  box-shadow: 0 0 0 3px rgba(106, 170, 106, 0.1);
}

.stimulus-textarea::placeholder {
  color: #bbb;
}

/* =============================================================================
   STAGE 6: INSPIRED - Values & Actions
   V7: Added question block layout for VALUES and ACTION questions
   ============================================================================= */

.stimulus-inspired-container {
  width: 100%;
  max-width: 400px;
}

.stimulus-inspired-section {
  margin-bottom: 28px;
}

.stimulus-inspired-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--stimulus-text);
  margin-bottom: 14px;
  text-align: center;
}

/* V7: Question Block Layout - For Stage 6 multiple questions */
.stimulus-question-block {
  width: 100%;
  max-width: 400px;
  margin-bottom: 24px;
}

.stimulus-question-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--stimulus-text);
  margin: 0 0 12px 0;
  text-align: center;
}

/* Value and Action Chips */
.stimulus-value-chips,
.stimulus-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.stimulus-value-chip,
.stimulus-action-chip {
  padding: 10px 16px;
  background: var(--stimulus-card-solid);
  border: 1px solid var(--stimulus-border);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--stimulus-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.stimulus-value-chip:hover,
.stimulus-action-chip:hover {
  background: #f5f5f5;
  border-color: var(--stimulus-green);
  color: var(--stimulus-green);
}

.stimulus-value-chip.selected,
.stimulus-action-chip.selected {
  background: var(--stimulus-green-light);
  border-color: var(--stimulus-green);
  color: #4a7c59;
}

/* V7: Textareas for Stage 6 questions */
.stimulus-value-textarea,
.stimulus-action-textarea {
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  background: var(--stimulus-card-solid);
  border: 1px solid var(--stimulus-border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--stimulus-text);
  resize: none;
  outline: none;
  line-height: 1.5;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stimulus-value-textarea:focus,
.stimulus-action-textarea:focus {
  border-color: var(--stimulus-green);
  box-shadow: 0 0 0 3px rgba(106, 170, 106, 0.1);
}

.stimulus-value-textarea::placeholder,
.stimulus-action-textarea::placeholder {
  color: #bbb;
}

/* Legacy: Action Input (single line) - kept for backward compatibility */
.stimulus-action-input {
  width: 100%;
  padding: 16px 18px;
  background: var(--stimulus-card-solid);
  border: 1px solid var(--stimulus-border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--stimulus-text);
  outline: none;
}

.stimulus-action-input:focus {
  border-color: var(--stimulus-green);
  box-shadow: 0 0 0 3px rgba(106, 170, 106, 0.1);
}

.stimulus-action-input::placeholder {
  color: #bbb;
}

/* =============================================================================
   STAGE 7: SHARE - Completion & Social
   ============================================================================= */

.stimulus-completion-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.stimulus-summary {
  background: var(--stimulus-card-bg);
  border-radius: 20px;
  padding: 20px 24px;
  margin: 20px 0;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--stimulus-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stimulus-summary-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--stimulus-border);
}

.stimulus-summary-item:last-child {
  border-bottom: none;
}

.summary-icon {
  font-size: 22px;
}

.summary-text {
  color: var(--stimulus-text);
  font-size: 15px;
  line-height: 1.4;
}

/* Share Section */
.stimulus-share-section {
  margin-top: 24px;
  text-align: center;
}

.stimulus-share-label {
  color: var(--stimulus-text-muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.stimulus-share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.stimulus-share-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--stimulus-card-solid);
  border: 1px solid var(--stimulus-border);
  color: var(--stimulus-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--stimulus-shadow);
}

.stimulus-share-btn:hover {
  background: #f5f5f5;
  transform: scale(1.08);
}

.stimulus-share-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Twitter/X */
.stimulus-share-btn[data-share="twitter"] {
  background: #000;
  border-color: #000;
  color: white;
}

.stimulus-share-btn[data-share="twitter"]:hover {
  background: #333;
}

/* Facebook */
.stimulus-share-btn[data-share="facebook"] {
  background: #1877f2;
  border-color: #1877f2;
  color: white;
}

.stimulus-share-btn[data-share="facebook"]:hover {
  background: #166fe5;
}

/* WhatsApp */
.stimulus-share-btn[data-share="whatsapp"] {
  background: #25d366;
  border-color: #25d366;
  color: white;
}

.stimulus-share-btn[data-share="whatsapp"]:hover {
  background: #20bd5a;
}

/* V6 FIX: Copy Link - Cleaner duplicate icon style (two overlapping rectangles) */
.stimulus-share-btn[data-share="copy"] {
  background: var(--stimulus-card-solid);
  color: var(--stimulus-text);
}

.stimulus-share-btn[data-share="copy"]:hover {
  background: var(--stimulus-green-light);
  border-color: var(--stimulus-green);
  color: var(--stimulus-green);
}

/* V6: Clean copy/duplicate icon using SVG stroke style */
.stimulus-share-btn[data-share="copy"] svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 480px) {
  .stimulus-inner {
    max-width: 100%;
    border-radius: 0; /* V8: Remove border-radius on mobile for full-width */
  }

  .stimulus-title {
    font-size: 22px;
  }

  .stimulus-subtitle {
    font-size: 14px;
  }

  .stimulus-icon {
    font-size: 48px;
  }

  /* V7: Responsive SVG icons */
  .stimulus-icon svg {
    width: 48px;
    height: 48px;
  }

  .stimulus-btn {
    padding: 14px 24px;
    font-size: 15px;
  }

  .stimulus-btn-large {
    padding: 16px 32px;
    font-size: 16px;
  }

  .stimulus-intro-card,
  .stimulus-info-card,
  .stimulus-summary,
  .stimulus-card-wrapper {
    padding: 20px;
    border-radius: 16px;
  }

  .stimulus-check-item {
    padding: 12px 14px;
  }

  .stimulus-check-text {
    font-size: 14px;
  }

  .stimulus-chills-btn {
    padding: 14px 26px;
    font-size: 15px;
  }

  .stimulus-video-wrapper {
    padding: 60px 12px 150px;
  }

  .stimulus-textarea {
    min-height: 120px;
    padding: 16px;
    font-size: 14px;
  }

  /* V7: Responsive textarea for Stage 6 */
  .stimulus-value-textarea,
  .stimulus-action-textarea {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 14px;
  }

  .stimulus-chip,
  .stimulus-value-chip,
  .stimulus-action-chip {
    padding: 8px 14px;
    font-size: 13px;
  }

  .stimulus-share-btn {
    width: 44px;
    height: 44px;
  }

  .stimulus-share-btn svg {
    width: 18px;
    height: 18px;
  }

  /* V5: Body map responsive */
  .stimulus-body-outline {
    width: 180px;
    height: 324px;
  }

  .stimulus-body-spot {
    width: 20px;
    height: 20px;
    border-width: 2px;
  }

  .stimulus-body-spot::after {
    width: 6px;
    height: 6px;
  }

  /* V7: Responsive question block */
  .stimulus-question-block {
    margin-bottom: 20px;
  }

  .stimulus-question-label {
    font-size: 14px;
    margin-bottom: 10px;
  }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

/* Fade In */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stimulus-fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Scale In */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.stimulus-scale-in {
  animation: scaleIn 0.3s ease-out;
}

/* Slide Up */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.stimulus-slide-up {
  animation: slideUp 0.5s ease-out;
}

/* V7: Spinner animation for loading state */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stimulus-spinner {
  animation: spin 1s linear infinite;
}

/* V7: Flying star animation for chills feedback */
@keyframes flyUp {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1.5); }
}

/* =============================================================================
   V5 ADDITIONS: BODY MAP OVERLAY STYLES
   These support the body map rendering in stimulus_player.js
   ============================================================================= */

/* Body map as full-screen overlay */
.stimulus-body-map-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--stimulus-screen-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.stimulus-body-map-overlay.hidden {
  display: none;
}

/* Body map header in overlay */
.stimulus-body-map-header {
  text-align: center;
  padding: 40px 20px 20px;
}

/* Body map canvas wrapper */
.stimulus-body-map-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-height: 60vh;
}

/* Spots layer overlays the image */
.stimulus-spots-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.stimulus-spots-layer .stimulus-body-spot {
  pointer-events: auto;
}

/* Body map footer with actions */
.stimulus-body-map-footer {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.stimulus-body-map-nav {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.stimulus-body-map-nav .stimulus-btn {
  flex: 1;
}

.stimulus-body-map-nav .stimulus-btn-primary {
  flex: 2;
}

/* Skip link style */
.stimulus-skip-link {
  color: var(--stimulus-text-muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.stimulus-skip-link:hover {
  color: var(--stimulus-text);
}
