/* Volvence Demo v6 - Multi-Dimensional Social Discovery */
/* Dark Sci-Fi Aesthetic with Social Connection Theme */

:root {
  /* Core palette */
  --bg-deep: #04060d;
  --bg-surface: #0a0e1a;
  --bg-elevated: #111827;
  --bg-card: rgba(15, 23, 42, 0.85);
  
  /* Accent colors - Social/Connection theme */
  --accent-cyan: #22d3ee;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-violet: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-pink: #ec4899;
  
  /* State colors */
  --state-healthy: #10b981;
  --state-warning: #f59e0b;
  --state-danger: #ef4444;
  --state-calm: #22d3ee;
  --state-love: #ec4899;
  --state-business: #3b82f6;
  
  /* Text colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Border & glow */
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-accent: rgba(34, 211, 238, 0.3);
  --glow-cyan: 0 0 20px rgba(34, 211, 238, 0.3);
  --glow-emerald: 0 0 20px rgba(16, 185, 129, 0.3);
  --glow-rose: 0 0 20px rgba(244, 63, 94, 0.3);
  --glow-pink: 0 0 20px rgba(236, 72, 153, 0.3);
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  
  /* Fonts */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  
  /* Sizing */
  --monitor-width: 320px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow: hidden;
}

body {
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    var(--bg-deep);
}

/* ===========================
   OVERLAY SCREENS
   =========================== */

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 13, 0.96);
  backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.overlay.active {
  display: flex;
  opacity: 1;
}

/* Intro Overlay */
.intro-content {
  max-width: 560px;
  padding: 48px;
  text-align: center;
}

.intro-title {
  margin-bottom: 24px;
}

.title-glyph {
  display: block;
  font-size: 32px;
  color: var(--accent-pink);
  margin-bottom: 12px;
  animation: glyphPulse 2s ease-in-out infinite;
}

@keyframes glyphPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.intro-title h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.2em;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.title-sub {
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.intro-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.intro-scenario {
  padding: 24px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.scenario-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-bottom: 8px;
}

.scenario-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.scenario-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.phase-tag {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.2);
  color: var(--accent-pink);
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  color: var(--bg-deep);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-pink);
}

.btn-icon {
  font-size: 14px;
}

/* Settlement Dashboard - 3 Column Horizontal Layout */
.settlement-dashboard {
  width: 95vw;
  max-width: 1400px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 40px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  box-shadow: var(--glow-pink);
}

.dashboard-header {
  text-align: center;
  margin-bottom: 32px;
}

.dashboard-icon {
  display: block;
  font-size: 28px;
  color: var(--accent-pink);
  margin-bottom: 12px;
  animation: glyphPulse 2s ease-in-out infinite;
}

.dashboard-header h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dashboard-sub {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-col {
  padding: 20px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
}

.col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.col-icon {
  font-size: 16px;
  color: var(--accent-pink);
}

.col-header h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* Column 1: Cognition Evolution */
.cognition-chart {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-bottom: 16px;
}

.cognition-before, .cognition-after {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.cognition-before {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.cognition-after {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.cognition-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cognition-after .cognition-label {
  color: var(--accent-emerald);
}

.cognition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cog-tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-family: var(--font-mono);
}

.cog-tag.old {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.cog-tag.new {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  animation: tagFlash 2s ease-in-out infinite;
}

@keyframes tagFlash {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
}

.cognition-arrow {
  text-align: center;
  padding: 8px 0;
  font-size: 12px;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
}

.cognition-insight {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: rgba(34, 211, 238, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.insight-icon {
  font-size: 16px;
}

.insight-text {
  font-size: 11px;
  color: var(--accent-cyan);
  line-height: 1.5;
}

/* Column 2: Radar Evolution */
.radar-evolution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.radar-stage {
  flex: 1;
  min-width: 80px;
  padding: 16px 12px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.radar-stage.highlight {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  box-shadow: var(--glow-emerald);
}

.radar-stage-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.radar-stage-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.radar-stage.highlight .radar-stage-name {
  color: var(--accent-emerald);
}

.radar-stage-desc {
  font-size: 9px;
  color: var(--text-muted);
}

.radar-evolve-arrow {
  font-size: 16px;
  color: var(--accent-cyan);
  opacity: 0.6;
}

/* Column 3: Discovery Cards */
.discovery-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.discovery-card {
  padding: 16px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.discovery-card.love {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.discovery-card.business {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.discovery-card.love .card-badge {
  background: rgba(236, 72, 153, 0.3);
  color: var(--accent-pink);
}

.discovery-card.business .card-badge {
  background: rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
}

.card-avatar {
  font-size: 32px;
  margin-bottom: 8px;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-insight {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 8px;
}

.card-match {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-amber);
}

.dashboard-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-note {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
}

/* Settlement responsive */
@media (max-width: 1024px) {
  .dashboard-columns {
    grid-template-columns: 1fr 1fr;
  }
  
  .col-results {
    grid-column: span 2;
  }
  
  .discovery-cards {
    flex-direction: row;
  }
  
  .discovery-card {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
  
  .col-results {
    grid-column: span 1;
  }
  
  .discovery-cards {
    flex-direction: column;
  }
}

/* ===========================
   MAIN LAYOUT
   =========================== */

.main-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ===========================
   LEFT COLUMN: LIFE MONITOR
   =========================== */

.life-monitor {
  width: var(--monitor-width);
  min-width: var(--monitor-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
}

.monitor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
}

.header-icon {
  font-size: 16px;
  color: var(--accent-pink);
}

.monitor-header h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

/* Radar Section */
.radar-section {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.radar-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.radar-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 260px;
  margin: 0 auto;
}

#radar-canvas {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.radar-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.radar-label {
  position: absolute;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.3s, transform 0.3s;
}

.radar-label[data-axis="physiological"] {
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
}

.radar-label[data-axis="safety"] {
  top: 35%;
  right: -2%;
  transform: translateY(-50%);
}

.radar-label[data-axis="belonging"] {
  bottom: 12%;
  right: 5%;
}

.radar-label[data-axis="esteem"] {
  bottom: 12%;
  left: 5%;
}

.radar-label[data-axis="selfActual"] {
  top: 35%;
  left: -2%;
  transform: translateY(-50%);
}

.radar-label.active {
  color: var(--accent-pink);
  transform: scale(1.1);
}

.radar-label.warning {
  color: var(--accent-amber);
}

.radar-label.danger {
  color: var(--accent-rose);
}

.radar-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Vitals Section */
.vitals-section {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.vitals-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.vitals-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vital-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.vital-item.pulse {
  border-color: var(--accent-pink);
  box-shadow: var(--glow-pink);
}

.vital-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.vital-icon {
  font-size: 12px;
  opacity: 0.8;
}

.vital-label {
  flex: 1;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.vital-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.vital-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.vital-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-violet));
  transition: width 0.5s ease-out;
}

.vital-fill.stress {
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-rose));
}

.vital-fill.entropy {
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-rose));
}

.vital-fill.dopamine {
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
}

/* State Summary */
.state-summary {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
}

.summary-item.social-mode {
  background: rgba(236, 72, 153, 0.05);
  border-color: rgba(236, 72, 153, 0.2);
}

.summary-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.summary-value {
  display: block;
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

.summary-item.social-mode .summary-value {
  font-style: italic;
  color: var(--accent-pink);
}

/* ===========================
   RIGHT COLUMN: THE FLOW
   =========================== */

.the-flow {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.flow-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.flow-header h2 {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

.time-indicator {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
}

/* Timeline Container */
.timeline-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.timeline-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Phase Separator */
.phase-separator {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  margin: 8px 0;
  flex-shrink: 0;
}

.phase-separator::before,
.phase-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
}

.phase-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-pink);
  white-space: nowrap;
}

/* Timeline Header */
.timeline-header {
  display: grid;
  grid-template-columns: 1.5fr 140px 1.5fr 70px 70px 80px;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-accent);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px 6px 0 0;
}

.header-cell {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-pink);
  text-align: center;
}

.header-cell:first-child {
  text-align: left;
}

/* Timeline Row */
.timeline-row {
  display: grid;
  grid-template-columns: 1.5fr 140px 1.5fr 70px 70px 80px;
  align-items: start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(20px);
  animation: rowAppear 0.4s ease-out forwards;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  min-height: 50px;
  flex-shrink: 0;
}

@keyframes rowAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-row.highlight {
  border-color: var(--accent-pink);
  box-shadow: var(--glow-pink);
  background: rgba(236, 72, 153, 0.08);
}

.timeline-row.danger {
  border-color: var(--accent-rose);
  box-shadow: var(--glow-rose);
  background: rgba(244, 63, 94, 0.08);
}

.timeline-row.emergence {
  border-color: var(--accent-emerald);
  box-shadow: var(--glow-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.timeline-row.ai-chat {
  border-color: var(--accent-violet);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.08);
}

.timeline-row.match-success {
  border-color: var(--accent-blue);
  box-shadow: var(--glow-blue);
  background: rgba(59, 130, 246, 0.08);
}

/* Row Cells */
.row-time {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.row-user, .row-ai {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.row-user {
  padding-left: 10px;
  border-left: 2px solid var(--accent-amber);
}

.row-ai {
  padding-left: 10px;
  border-left: 2px solid var(--accent-pink);
}

.row-user .speaker, .row-ai .speaker {
  display: block;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.row-user .speaker {
  color: var(--accent-amber);
}

.row-ai .speaker {
  color: var(--accent-pink);
}

.row-user .content, .row-ai .content {
  color: var(--text-primary);
  font-size: 13px;
}

/* AI Chat bubbles */
.row-ai-chat {
  padding-left: 10px;
  border-left: 2px solid var(--accent-violet);
}

.row-ai-chat .speaker {
  display: block;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
  color: var(--accent-violet);
}

.row-ai-chat .content {
  color: var(--text-primary);
  font-size: 12px;
}

/* Match Result */
.row-match {
  grid-column: span 6;
  padding: 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  text-align: center;
}

.match-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.match-metrics {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.match-metric {
  font-size: 11px;
  color: var(--text-secondary);
}

.match-metric span {
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Strategy/Need/Social Mode Columns */
.row-strategy, .row-need, .row-social {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  font-size: 10px;
  min-height: 40px;
}

.row-strategy .cell-value,
.row-need .cell-value {
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.row-strategy .cell-value {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
  border-color: rgba(139, 92, 246, 0.4);
}

.row-need .cell-value {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.4);
}

.social-pill {
  padding: 3px 6px;
  border-radius: 8px;
  font-size: 8px;
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.2;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-pill.emergence {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  animation: pillPulse 1.5s ease-in-out infinite;
}

/* Emergence text styles */
.emergence-text.cell-hidden {
  opacity: 0;
  transform: scale(0.8);
}

.emergence-text.cell-reveal {
  opacity: 1;
  transform: scale(1);
}

/* Text Pulse Animation for emergence */
.text-pulse {
  animation: textPulseEmergence 0.8s ease-out;
}

@keyframes textPulseEmergence {
  0% { transform: scale(1); }
  15% { transform: scale(1.15); box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
  30% { transform: scale(0.98); }
  50% { transform: scale(1.08); box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1); }
  85% { transform: scale(1.04); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
  100% { transform: scale(1); box-shadow: none; }
}

/* Light Beam Animation for Emergence */
.emergence-beam {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 12px var(--accent-emerald), 0 0 24px var(--accent-emerald), 0 0 36px rgba(16, 185, 129, 0.6);
  pointer-events: none;
  z-index: 1000;
}

@keyframes pillPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
}

.social-pill {
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
}

.social-pill.radar {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-violet);
}

.social-pill.universe {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}

.social-pill.dual {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(59, 130, 246, 0.2));
  color: var(--accent-cyan);
}

/* Typewriter Effect */
.typewriter-target {
  min-height: 1.2em;
  display: inline-block;
}

.typewriter-target.typing::after {
  content: '|';
  animation: blink 0.7s infinite;
  color: var(--accent-pink);
  font-weight: normal;
  margin-left: 1px;
}

.typewriter-target.typed::after {
  content: '';
  display: none;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Reasoning Chain Styles */
.row-reasoning {
  display: flex;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  font-size: 9px;
}

.chain-item {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(236, 72, 153, 0.1);
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  font-size: 9px;
}

.chain-item.chain-reveal {
  opacity: 1;
  transform: translateX(0);
}

.chain-arrow {
  color: var(--accent-pink);
  font-weight: bold;
  font-size: 10px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.chain-arrow.chain-reveal {
  opacity: 0.7;
  transform: scale(1);
}

.chain-item.radar-state {
  background: rgba(34, 211, 238, 0.15);
  border-left: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.chain-item.need-state {
  background: rgba(245, 158, 11, 0.12);
  border-left: 2px solid var(--accent-amber);
  color: var(--accent-amber);
}

.chain-item.strategy-state {
  background: rgba(139, 92, 246, 0.12);
  border-left: 2px solid var(--accent-violet);
  color: var(--accent-violet);
}

/* Chain reward with heart icons */
.chain-item.chain-reward {
  font-size: 12px;
  opacity: 0;
  transform: scale(0.8);
  padding: 2px 4px;
  background: transparent;
  border: none;
}

.chain-item.chain-reward.show {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.reward-arrow {
  color: var(--accent-amber);
}

/* Reward Signal */
.reward-signal {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  animation: rewardPop 0.3s ease-out;
}

@keyframes rewardPop {
  0% { transform: translateY(-50%) scale(0); opacity: 0; }
  50% { transform: translateY(-50%) scale(1.2); }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

.reward-signal.positive {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.reward-signal.strong-positive {
  background: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  animation: rewardPop 0.3s ease-out, glowPulse 1s ease-in-out infinite;
}

.reward-signal.negative {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

.reward-signal.strong-negative {
  background: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  animation: rewardPop 0.3s ease-out, dangerPulse 0.5s ease-in-out 3;
}

.reward-signal.neutral {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

@keyframes glowPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
}

@keyframes dangerPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(244, 63, 94, 0.5); }
}

/* Progress Section */
.progress-section {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.speed-btn, .play-pause-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.speed-btn:hover, .play-pause-btn:hover {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
}

.play-pause-btn {
  min-width: 100px;
}

.speed-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-pink);
  min-width: 40px;
  text-align: center;
}

.progress-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-violet));
  transition: width 0.3s ease-out;
  width: 0%;
}

.progress-phases {
  display: flex;
  justify-content: space-between;
}

.phase-marker {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

.phase-marker.active {
  color: var(--accent-pink);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 72, 153, 0.5);
}

/* Back to Index Button */
.back-to-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  margin-top: 24px;
  border: 1px solid var(--accent-pink);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  background: rgba(236, 72, 153, 0.1);
  color: var(--accent-pink);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-to-index:hover {
  background: rgba(236, 72, 153, 0.2);
  box-shadow: var(--glow-pink);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1200px) {
  .timeline-row, .timeline-header {
    grid-template-columns: 1.5fr 120px 1.5fr 60px 60px;
  }
  
  .row-social, .header-cell:last-child {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --monitor-width: 260px;
  }
  
  .timeline-row, .timeline-header {
    grid-template-columns: 1.5fr 100px 1.5fr;
  }
  
  .row-strategy, .row-cognition,
  .header-cell:nth-child(4), .header-cell:nth-child(5) {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }
  
  .life-monitor {
    width: 100%;
    min-width: auto;
    height: auto;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .radar-section, .vitals-section, .state-summary {
    flex: 1;
    min-width: 200px;
  }
}

