/* YesAnd - Improv Practice Partner Styles */

:root {
  /* Color Palette - Deep theater theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --bg-elevated: #22222e;

  --accent-primary: #8b5cf6;
  --accent-secondary: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.3);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);

  --warning: #f59e0b;
  --danger: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  /* Prevent global scroll */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* App Container */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-xl);
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  font-size: 1.75rem;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-icon.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.btn-secondary {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
}

.btn-end {
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(135deg, var(--danger), #dc2626);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-end:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Main Content */
.main {
  flex: 1;
  padding: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  /* Ensure main takes full height for flex children */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Prevent scroll within main */
}

/* Live Panel */
.live-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  /* Take all available space */
  min-height: 0;
  /* Allow shrinking */
  height: 100%;
}

/* Panels */
.panel {
  animation: fadeIn 0.4s ease;
  height: 100%;
  /* Ensure panels take full height */
  display: flex;
  /* Make panels flex containers */
  flex-direction: column;
}

.setup-panel,
.summary-panel {
  /* Panels with long content need scrolling */
  overflow-y: auto;
  display: block;
  /* Works better as block for scrolling content */
}

.panel.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Setup Panel */
.setup-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.setup-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.setup-header p {
  color: var(--text-secondary);
}

.setup-header .optional-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-md);
}

.setup-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.setup-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border);
}

.setup-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Goal Options */
.goal-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
}

.goal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.goal-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.goal-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.1));
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.goal-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}

.goal-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.goal-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Partner Grid */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
}

.partner-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.partner-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.partner-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.1));
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.partner-avatar {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.partner-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.partner-style {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Start Button */
.btn-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: 300px;
  margin: var(--space-2xl) auto 0;
  padding: var(--space-lg) var(--space-2xl);
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.btn-start:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-glow), 0 8px 32px rgba(139, 92, 246, 0.4);
}

.btn-pulse {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Live Panel */
.live-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-full);
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }
}

.live-controls {
  display: flex;
  gap: var(--space-sm);
}

/* Scene State */
.scene-state {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.state-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--border);
}

.state-item.unusual {
  grid-column: 1 / -1;
  /* Span all columns */
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(16, 185, 129, 0.1));
  border-color: var(--accent-primary);
}

.state-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.state-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Transcript Area */
.transcript-area {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 0;
  /* Remove padding from container */
  min-height: 200px;
  max-height: 500px;
  /* Increased height */
  overflow-y: auto;
  border: 1px solid var(--border);
  margin-bottom: var(--space-lg);
  scroll-behavior: smooth;
  position: relative;
}

.transcript-area.hidden {
  display: none;
}

.transcript {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  /* Add padding to content */
}

.transcript-line {
  display: flex;
  gap: var(--space-md);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.transcript-line.user {
  justify-content: flex-end;
}

.transcript-line .speaker {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 60px;
}

.transcript-line.user .speaker {
  color: var(--accent-primary);
}

.transcript-line.agent .speaker {
  color: var(--success);
}

.transcript-line .text {
  background: var(--bg-card);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  max-width: 80%;
}

.transcript-line.user .text {
  background: rgba(139, 92, 246, 0.2);
}

/* Highlight latest line */
.transcript-line.latest {
  opacity: 1;
}

.transcript-line.latest .text {
  box-shadow: 0 0 15px var(--accent-glow);
  border: 1px solid var(--accent-primary);
  transform: scale(1.02);
  transition: all 0.3s ease;
}

/* Audio Visualization */
.audio-viz {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
  flex-shrink: 0;
  /* Prevent container from collapsing */
}

.viz-bar {
  width: 4px;
  height: 35px;
  /* Fixed max height */
  background: var(--accent-primary);
  border-radius: 2px;
  transform-origin: bottom;
  /* Scale from bottom up */
  animation: audioWave 1s ease-in-out infinite;
}

.viz-bar:nth-child(1) {
  animation-delay: 0s;
}

.viz-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.viz-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.viz-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.viz-bar:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes audioWave {

  0%,
  100% {
    transform: scaleY(0.3);
    opacity: 0.5;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Summary Panel */
.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.summary-header h2 {
  font-size: 1.75rem;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.summary-box,
.highlights-box,
.suggestions-box,
.markers-box,
.notes-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border);
}

.summary-box h3,
.highlights-box h3,
.suggestions-box h3,
.markers-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.summary-text {
  font-size: 1.125rem;
  line-height: 1.7;
}

/* Scene Elements */
.scene-elements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.element {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--border);
}

.element.unusual {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(16, 185, 129, 0.1));
  border-color: var(--accent-primary);
}

.element-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.element-value {
  color: var(--text-primary);
}

/* Highlights & Suggestions Lists */
.highlights-list,
.suggestions-list {
  list-style: none;
}

.highlights-list li,
.suggestions-list li {
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  border-left: 3px solid var(--success);
}

.suggestions-list li {
  border-left-color: var(--warning);
}

/* Scene Timeline */
.scene-timeline {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.timeline-marker {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.timeline-marker.emotion {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-secondary);
}

.timeline-marker.topic {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

/* Summary Bullets (Improvement #4) */
.summary-bullets {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.summary-bullets li {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  line-height: 1.5;
}

.summary-punchline {
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-primary);
  font-style: italic;
  color: var(--text-secondary);
}

/* Key Moves (Improvement #1) */
.key-moves-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.key-move-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border-left: 3px solid var(--success);
}

.move-description {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.move-quote {
  font-style: italic;
  color: var(--accent-secondary);
  padding: var(--space-sm);
  background: rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-sm);
  margin: var(--space-sm) 0;
}

.move-why {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Focus Areas (Improvement #2) */
.focus-areas-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.focus-area-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border-left: 3px solid var(--warning);
}

.focus-try {
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.focus-why {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
}

.focus-example {
  font-style: italic;
  color: var(--text-muted);
  padding: var(--space-sm);
  background: rgba(245, 158, 11, 0.1);
  border-radius: var(--radius-sm);
  margin: var(--space-sm) 0;
}

.focus-tip {
  color: var(--accent-primary);
  font-size: 0.875rem;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  margin-top: var(--space-sm);
}

/* Visual Timeline (Improvement #3) */
.scene-timeline-visual {
  padding: var(--space-md);
}

.timeline-bar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.timeline-segment {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 80px;
  transition: transform 0.2s ease;
}

.timeline-segment:hover {
  transform: scale(1.05);
}

.segment-label {
  font-size: 0.75rem;
  font-weight: 500;
}

.timeline-arrow {
  color: var(--text-muted);
  font-size: 1rem;
}

.color-green {
  background: rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.color-yellow {
  background: rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.color-red {
  background: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.color-blue {
  background: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.color-neutral {
  background: var(--bg-card);
  color: var(--text-secondary);
}

/* Next Scene Suggestion (Improvement #6) */
.next-scene-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(16, 185, 129, 0.15));
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--accent-primary);
  text-align: center;
}

.next-scene-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--accent-secondary);
}

.next-scene-text {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Reflection Prompts (Improvement #7) */
.reflection-prompts {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.prompt-chip {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.prompt-chip:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}


/* Score Circle */
.score-box {
  display: flex;
  justify-content: center;
  padding: var(--space-xl);
}

.score-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  border-radius: 50%;
  box-shadow: var(--shadow-glow);
}

.score-value {
  font-size: 2.5rem;
  font-weight: 700;
}

.score-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* Transcript Details */
.transcript-details {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}

.transcript-details summary {
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
}

.transcript-details summary:hover {
  color: var(--text-primary);
}

.full-transcript {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  max-height: 300px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Notes Box */
.notes-box label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.notes-box textarea {
  width: 100%;
  min-height: 100px;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  margin-bottom: var(--space-md);
}

.notes-box textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* History Sidebar */
.history-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transform: translateX(0);
  transition: transform var(--transition-normal);
}

.history-sidebar.hidden {
  transform: translateX(100%);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* Scoreboard */
.scoreboard {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.scoreboard h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.score-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.score-count {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.score-name {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* History List */
.history-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-xl);
}

.history-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.history-item:hover {
  border-color: var(--accent-primary);
}

.history-item .date {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-item .summary {
  font-size: 0.875rem;
  margin: var(--space-xs) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-item .meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-item .meta .goal {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.history-item .meta .partner {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Responsive */
/* Small screens - tablets */
@media (max-width: 900px) {
  .scene-state {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .state-item {
    padding: var(--space-sm);
  }

  .state-value {
    font-size: 0.8rem;
    line-height: 1.4;
  }
}

/* Mobile screens */
@media (max-width: 768px) {
  .main {
    padding: var(--space-sm);
  }

  .setup-header h2 {
    font-size: 1.5rem;
  }

  .goal-options,
  .partner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Compact scene state for mobile - horizontal scroll */
  .scene-state {
    display: flex;
    overflow-x: auto;
    gap: var(--space-sm);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    scroll-snap-type: x mandatory;
  }

  .scene-state::-webkit-scrollbar {
    height: 4px;
  }

  .state-item {
    flex: 0 0 140px;
    scroll-snap-align: start;
    padding: var(--space-sm);
  }

  .state-item.unusual {
    flex: 0 0 200px;
  }

  .state-label {
    font-size: 0.5rem;
    margin-bottom: 2px;
  }

  .state-value {
    font-size: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* More space for transcript on mobile */
  .transcript-area {
    min-height: 250px;
    max-height: 50vh;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .transcript-line {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .transcript-line .speaker {
    min-width: auto;
    font-size: 0.65rem;
  }

  .transcript-line .text {
    max-width: 100%;
    font-size: 0.875rem;
  }

  /* Live header compact */
  .live-header {
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .live-indicator {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.65rem;
  }

  /* Summary elements single column */
  .scene-elements {
    grid-template-columns: 1fr;
  }

  .element.unusual {
    grid-column: span 1;
  }

  .history-sidebar {
    width: 100%;
  }

  /* Summary boxes more compact */
  .summary-box,
  .highlights-box,
  .suggestions-box,
  .markers-box,
  .notes-box {
    padding: var(--space-md);
  }

  .summary-text {
    font-size: 1rem;
  }

  .highlights-list li,
  .suggestions-list li {
    padding: var(--space-sm);
    font-size: 0.875rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .header {
    padding: var(--space-sm) var(--space-md);
  }

  .logo h1 {
    font-size: 1.25rem;
  }

  .scene-state {
    margin-bottom: var(--space-sm);
  }

  .state-item {
    flex: 0 0 120px;
  }

  .state-item.unusual {
    flex: 0 0 160px;
  }

  .transcript-area {
    max-height: 45vh;
    border-radius: var(--radius-md);
  }

  .live-controls {
    gap: var(--space-xs);
  }

  .btn-end {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
  }

  .goal-options,
  .partner-grid {
    grid-template-columns: 1fr;
  }

  .goal-btn,
  .partner-btn {
    flex-direction: row;
    text-align: left;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .goal-icon,
  .partner-avatar {
    font-size: 1.5rem;
    margin-bottom: 0;
  }

  .goal-desc,
  .partner-style {
    text-align: left;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Yes-And Moment Formatting */
.yes-and-moment {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.moment-quote {
  font-style: italic;
  color: var(--accent-secondary);
  font-size: 1rem;
  line-height: 1.5;
  position: relative;
  padding-left: var(--space-sm);
}

.moment-quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.moment-explanation {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: var(--space-md);
}