/* LieScan Audio - Entropy Analysis for Spoken Words */
/* Based on EIDOS Compare styling patterns */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  background: #050508;
  color: #e0e0e0;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 30px;
}

.title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 14px;
  color: #888;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* =============================================================================
   EXPLAINER SECTION
   ============================================================================= */
.explainer-section {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 20px;
}

.explainer-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #8b5cf6;
  margin-bottom: 12px;
}

.explainer-text {
  font-size: 13px;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 15px;
}

.explainer-text strong {
  color: #fff;
}

.explainer-text em {
  color: #a78bfa;
  font-style: normal;
}

.explainer-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
  padding-left: 10px;
}

.explainer-legend span {
  font-size: 12px;
  line-height: 1.5;
}

.legend-stable {
  color: #22c55e;
}

.legend-stable::before {
  content: "✅ ";
}

.legend-drift {
  color: #eab308;
}

.legend-drift::before {
  content: "⚠️ ";
}

.legend-collapse {
  color: #ef4444;
}

.legend-collapse::before {
  content: "🔥 ";
}

.explainer-note {
  font-size: 12px;
  color: #888;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin: 0;
}

.explainer-note em {
  color: #a78bfa;
  font-style: normal;
}

/* Soul Pressure Styling */
.explainer-text.soul-pressure {
  color: #c4b5fd;
}

.explainer-highlight {
  font-size: 14px;
  font-weight: 500;
  color: #f9a8d4;
  text-align: center;
  padding: 12px;
  margin: 15px 0;
  background: rgba(236, 72, 153, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.explainer-tagline {
  font-size: 12px;
  color: #8b5cf6;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 10px;
}

/* Input Clarification */
.input-clarification {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  margin-bottom: 15px;
}

.clarify-icon {
  font-size: 18px;
}

.clarify-text {
  font-size: 12px;
  color: #93c5fd;
}

.clarify-text strong {
  color: #60a5fa;
}

.clarify-text em {
  color: #a5b4fc;
  font-style: normal;
}

/* =============================================================================
   PRIVACY NOTICE
   ============================================================================= */
.privacy-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  margin-bottom: 25px;
}

.privacy-icon {
  font-size: 18px;
}

.privacy-text {
  font-size: 12px;
  color: #22c55e;
  letter-spacing: 0.5px;
}

/* File Type Note */
.file-type-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  margin-top: 15px;
  font-size: 12px;
  color: #888;
}

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

/* =============================================================================
   AUDIO SAMPLES LIBRARY (Legacy - hidden)
   ============================================================================= */
.samples-section {
  display: none;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}

.samples-header {
  text-align: center;
  margin-bottom: 20px;
}

.samples-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #8b5cf6;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.samples-subtitle {
  font-size: 12px;
  color: #888;
}

.samples-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.sample-tab {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #aaa;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sample-tab:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
}

.sample-tab.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: #8b5cf6;
  color: #fff;
}

.samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.samples-grid::-webkit-scrollbar {
  width: 6px;
}

.samples-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.samples-grid::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 3px;
}

.sample-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sample-card:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateX(3px);
}

.sample-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.sample-info {
  flex: 1;
  min-width: 0;
}

.sample-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.sample-quote {
  font-size: 11px;
  color: #aaa;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.sample-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #666;
}

.sample-duration {
  color: #8b5cf6;
  font-weight: 500;
}

.sample-play-btn {
  padding: 8px 12px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sample-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(139, 92, 246, 0.4);
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
  gap: 15px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.divider-text {
  font-size: 11px;
  letter-spacing: 1px;
  color: #555;
  text-transform: uppercase;
}

/* Upload Section */
.upload-section {
  margin-bottom: 20px;
}

.input-options {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 700px) {
  .input-options {
    flex-direction: column;
  }
}

.input-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
}

.dropzone {
  flex: 1;
  border: 2px dashed rgba(139, 92, 246, 0.4);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(139, 92, 246, 0.05);
}

.dropzone:hover {
  border-color: rgba(139, 92, 246, 0.7);
  background: rgba(139, 92, 246, 0.1);
}

.dropzone.dragover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.15);
  transform: scale(1.01);
}

.dropzone-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.dropzone-text {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 5px;
}

.dropzone-subtext {
  font-size: 11px;
  color: #666;
}

/* Recording Section */
.record-zone {
  flex: 1;
  border: 2px dashed rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(239, 68, 68, 0.05);
  position: relative;
}

.record-zone:hover {
  border-color: rgba(239, 68, 68, 0.7);
  background: rgba(239, 68, 68, 0.1);
}

.record-zone.recording {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  animation: recordingPulse 1.5s ease-in-out infinite;
}

.record-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.record-icon {
  font-size: 40px;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.record-zone.recording .record-icon {
  animation: micPulse 0.8s ease-in-out infinite;
}

.record-text {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 5px;
}

.record-subtext {
  font-size: 11px;
  color: #666;
}

.record-timer {
  position: absolute;
  top: 10px;
  right: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #ef4444;
  font-weight: 600;
}

.timer-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: timerDotPulse 1s ease-in-out infinite;
}

@keyframes recordingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 20px 5px rgba(239, 68, 68, 0.3); }
}

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

@keyframes timerDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Audio Player */
.audio-player-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.audio-player-container audio {
  width: 100%;
  height: 40px;
}

.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: #888;
}

.clear-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
}

.clear-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Status Bar */
.status-bar {
  text-align: center;
  padding: 15px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.status-text {
  font-size: 13px;
  color: #888;
}

.status-bar.processing .status-text {
  color: #eab308;
}

.status-bar.success .status-text {
  color: #22c55e;
}

.status-bar.error .status-text {
  color: #ef4444;
}

/* Main Content - Two Column Layout */
.main-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 25px;
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* Transcript Section */
.transcript-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #888;
  text-transform: uppercase;
}

.word-count {
  font-size: 11px;
  color: #666;
}

.transcript-display {
  padding: 20px;
  min-height: 200px;
  line-height: 2;
  font-size: 15px;
  color: #ccc;
}

/* Entropy Timeline Visualization */
.entropy-timeline-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #8b5cf6;
  text-transform: uppercase;
}

.entropy-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 8px;
  overflow: hidden;
}

.entropy-bar {
  flex: 1;
  min-width: 3px;
  max-width: 8px;
  border-radius: 2px 2px 0 0;
  transition: all 0.2s ease;
}

.entropy-bar:hover {
  opacity: 0.8;
  transform: scaleY(1.05);
}

.entropy-bar.entropy-stable {
  background: linear-gradient(to top, #22c55e, #4ade80);
}

.entropy-bar.entropy-rising {
  background: linear-gradient(to top, #eab308, #facc15);
}

.entropy-bar.entropy-drift {
  background: linear-gradient(to top, #f97316, #fb923c);
}

.entropy-bar.entropy-collapse {
  background: linear-gradient(to top, #ef4444, #f87171);
}

.entropy-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 11px;
}

.entropy-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-stable { color: #22c55e; }
.legend-rising { color: #eab308; }
.legend-drift { color: #f97316; }
.legend-collapse { color: #ef4444; }

/* Drift Events Section */
.drift-events-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.drift-events-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #f97316;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.drift-event {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  font-size: 12px;
}

.drift-event.medium {
  background: rgba(249, 115, 22, 0.1);
  border-left: 3px solid #f97316;
}

.drift-event.high {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
}

.drift-time {
  font-weight: 500;
  color: #aaa;
}

.drift-change {
  font-weight: 600;
  color: #f97316;
}

.drift-event.high .drift-change {
  color: #ef4444;
}

.drift-more {
  font-size: 11px;
  color: #666;
  text-align: center;
  padding: 8px;
}

/* Judgment Badge States */
.judgment-hero-badge.stable {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.judgment-hero-badge.stir {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.judgment-hero-badge.watch {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.judgment-hero-badge.panic {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
  animation: panicPulse 1.5s ease-in-out infinite;
}

.judgment-hero-badge.collapse {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: collapsePulse 0.8s ease-in-out infinite;
}

@keyframes panicPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(249, 115, 22, 0.2); }
  50% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.4); }
}

@keyframes collapsePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.5); }
}

/* Indicator Value States */
.ind-value.stable { color: #22c55e; }
.ind-value.rising { color: #eab308; }
.ind-value.drift { color: #f97316; }
.ind-value.wobble { color: #f97316; }
.ind-value.collapse { color: #ef4444; }

/* Drift Insight States */
.drift-insight-display.stable {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid #22c55e;
  color: #86efac;
}

.drift-insight-display.stir {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  color: #93c5fd;
}

.drift-insight-display.watch {
  background: rgba(234, 179, 8, 0.1);
  border-left: 3px solid #eab308;
  color: #fde047;
}

.drift-insight-display.panic {
  background: rgba(249, 115, 22, 0.1);
  border-left: 3px solid #f97316;
  color: #fdba74;
}

.drift-insight-display.collapse {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  color: #fca5a5;
}

/* =============================================================================
   VOICE INTERPRETATION
   ============================================================================= */
.interpretation-section {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.interpretation-display {
  font-size: 13px;
  line-height: 1.7;
  color: #c4b5fd;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.interpretation-display.stable { color: #86efac; }
.interpretation-display.tension { color: #fde68a; }
.interpretation-display.friction { color: #fdba74; }
.interpretation-display.collapse { color: #fca5a5; }

/* =============================================================================
   TRUTHSCORE METER
   ============================================================================= */
.truthscore-section {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.truthscore-meter {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 12px 0;
}

.truthscore-bar {
  flex: 1;
  height: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
}

.truthscore-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease, background 0.3s ease;
}

.truthscore-fill.stable {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.truthscore-fill.tension {
  background: linear-gradient(90deg, #eab308, #facc15);
}

.truthscore-fill.friction {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.truthscore-fill.collapse {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.truthscore-value {
  font-size: 24px;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}

.truthscore-value.stable { color: #22c55e; }
.truthscore-value.tension { color: #eab308; }
.truthscore-value.friction { color: #f97316; }
.truthscore-value.collapse { color: #ef4444; }

.truthscore-label {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

.truthscore-label.stable { color: #22c55e; }
.truthscore-label.tension { color: #eab308; }
.truthscore-label.friction { color: #f97316; }
.truthscore-label.collapse { color: #ef4444; }

.truthscore-explainer {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* =============================================================================
   TRUTH/COLLAPSE METRICS SECTION
   ============================================================================= */
.truth-section {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.highlight-row {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.cpi-value.stable, .tension-value.stable { color: #22c55e; }
.cpi-value.friction, .tension-value.friction { color: #f97316; }
.cpi-value.collapse, .tension-value.collapse { color: #ef4444; }

/* =============================================================================
   DISCLAIMER SECTION
   ============================================================================= */
.disclaimer-section {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.disclaimer-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fcd34d;
  margin-bottom: 8px;
}

.disclaimer-text {
  font-size: 12px;
  line-height: 1.6;
  color: #fde68a;
}

.disclaimer-text em {
  color: #f59e0b;
  font-style: normal;
}

.disclaimer-text strong {
  color: #fbbf24;
}

/* New badge states for TruthScore */
.judgment-hero-badge.tension {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.judgment-hero-badge.friction {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
  animation: frictionPulse 2s ease-in-out infinite;
}

@keyframes frictionPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(249, 115, 22, 0.15); }
  50% { box-shadow: 0 0 18px rgba(249, 115, 22, 0.3); }
}

/* Metrics Section */
.metrics-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Judgment Hero Badge */
.judgment-hero {
  text-align: center;
  padding: 10px;
}

.judgment-hero-badge {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  letter-spacing: 1px;
}

.judgment-hero-badge.trusted {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.judgment-hero-badge.unstable {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.judgment-hero-badge.collapse-risk {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
  animation: heroCollapseRiskPulse 1.5s ease-in-out infinite;
}

.judgment-hero-badge.critical {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: criticalPulse 0.8s ease-in-out infinite;
}

/* Indicator Sections */
.indicator-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 15px;
}

.indicator-section .section-label {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.indicator-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.ind-label {
  font-size: 12px;
  color: #888;
}

.ind-value {
  font-size: 13px;
  font-weight: 500;
  color: #ccc;
}

/* Drift Insight Display */
.drift-insight-display {
  font-size: 12px;
  line-height: 1.6;
  color: #9ca3af;
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid;
  background: rgba(255, 255, 255, 0.02);
}

.drift-insight-display.stable {
  border-left-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
  color: #86efac;
}

.drift-insight-display.stir {
  border-left-color: #60a5fa;
  background: rgba(96, 165, 250, 0.05);
  color: #93c5fd;
}

.drift-insight-display.watch {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.05);
  color: #fcd34d;
}

.drift-insight-display.panic {
  border-left-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  color: #fdba74;
}

.drift-insight-display.collapse {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-weight: 500;
}

/* Entropy Level States */
.ind-value.entropy-level.very-low { color: #22c55e; }
.ind-value.entropy-level.low { color: #22c55e; }
.ind-value.entropy-level.rising { color: #eab308; }
.ind-value.entropy-level.high { color: #f97316; }
.ind-value.entropy-level.hallucinating {
  color: #ef4444;
  animation: hallucinatoryPulse 1s ease-in-out infinite;
}

/* Collapse Drift States */
.ind-value.collapse-drift.stable { color: #22c55e; background: rgba(34, 197, 94, 0.1); padding: 2px 8px; border-radius: 4px; }
.ind-value.collapse-drift.vibrating { color: #eab308; background: rgba(234, 179, 8, 0.1); padding: 2px 8px; border-radius: 4px; }
.ind-value.collapse-drift.wobbling { color: #f97316; background: rgba(249, 115, 22, 0.15); padding: 2px 8px; border-radius: 4px; }
.ind-value.collapse-drift.collapse { color: #ef4444; background: rgba(239, 68, 68, 0.15); padding: 2px 8px; border-radius: 4px; animation: driftDangerPulse 1s ease-in-out infinite; }

/* Reflex Trigger States */
.ind-value.reflex-trigger.none { color: #666; font-style: italic; }
.ind-value.reflex-trigger.stir { color: #60a5fa; background: rgba(96, 165, 250, 0.12); padding: 2px 8px; border-radius: 4px; }
.ind-value.reflex-trigger.watch { color: #eab308; background: rgba(234, 179, 8, 0.12); padding: 2px 8px; border-radius: 4px; }
.ind-value.reflex-trigger.panic { color: #f97316; background: rgba(249, 115, 22, 0.15); padding: 2px 8px; border-radius: 4px; animation: panicPulse 1s ease-in-out infinite; }
.ind-value.reflex-trigger.collapse { color: #ef4444; background: rgba(239, 68, 68, 0.15); padding: 2px 8px; border-radius: 4px; animation: collapsePulse 0.5s ease-in-out infinite; }

/* Token Highlighting */
.entropy-token {
  position: relative;
  padding: 1px 3px;
  margin: 0 1px;
  border-radius: 3px;
  cursor: help;
  transition: all 0.2s ease;
}

.entropy-token:hover {
  transform: scale(1.05);
  z-index: 10;
}

.entropy-token:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
  color: #fff;
}

.entropy-token.token-low {
  background: rgba(34, 197, 94, 0.15);
  border-bottom: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.entropy-token.token-medium {
  background: rgba(234, 179, 8, 0.2);
  border-bottom: 1px solid rgba(234, 179, 8, 0.5);
  color: #fcd34d;
}

.entropy-token.token-high {
  background: rgba(249, 115, 22, 0.25);
  border-bottom: 2px solid rgba(249, 115, 22, 0.6);
  color: #fdba74;
  text-shadow: 0 0 3px rgba(249, 115, 22, 0.4);
}

.entropy-token.token-critical {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.5), rgba(185, 28, 28, 0.4));
  border-bottom: 2px solid rgba(239, 68, 68, 0.8);
  color: #fecaca;
  text-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
  animation: criticalTokenPulse 1.2s ease-in-out infinite;
}

.entropy-token.drift-onset {
  border-left: 3px solid #f97316;
  animation: driftOnsetPulse 1.5s ease-in-out infinite;
}

.entropy-token.drift-zone {
  background: rgba(168, 85, 247, 0.08);
  border-bottom: 1px dashed rgba(168, 85, 247, 0.3);
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 0 20px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #555;
}

.footer a {
  color: #8b5cf6;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.separator {
  margin: 0 10px;
}

/* Animations */
@keyframes criticalTokenPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.7); transform: scale(1.02); }
}

@keyframes driftOnsetPulse {
  0%, 100% { border-left-color: #f97316; box-shadow: -2px 0 6px rgba(249, 115, 22, 0.4); }
  50% { border-left-color: #fb923c; box-shadow: -4px 0 12px rgba(249, 115, 22, 0.6); }
}

@keyframes panicPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 rgba(249, 115, 22, 0); }
  50% { opacity: 0.8; box-shadow: 0 0 8px rgba(249, 115, 22, 0.4); }
}

@keyframes collapsePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes heroCollapseRiskPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(249, 115, 22, 0.3); }
  50% { box-shadow: 0 0 24px rgba(249, 115, 22, 0.5); }
}

@keyframes criticalPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.7); }
}

@keyframes driftDangerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes hallucinatoryPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 transparent; }
  50% { opacity: 0.8; text-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
}

/* =============================================================================
   TIMELINE PULSE - Drift/Collapse Zone Markers
   ============================================================================= */
.timeline-pulse-container {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-pulse-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #ec4899;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.timeline-pulse-track {
  display: flex;
  gap: 1px;
  height: 24px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 3px;
  overflow: hidden;
}

.pulse-segment {
  flex: 1;
  border-radius: 2px;
  transition: all 0.2s ease;
  cursor: help;
  min-width: 3px;
}

.pulse-segment:hover {
  transform: scaleY(1.3);
  z-index: 10;
}

.pulse-empty {
  background: rgba(255, 255, 255, 0.05);
}

.pulse-stable {
  background: linear-gradient(to bottom, #22c55e, #16a34a);
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}

.pulse-rising {
  background: linear-gradient(to bottom, #eab308, #ca8a04);
  box-shadow: 0 0 4px rgba(234, 179, 8, 0.3);
}

.pulse-drift {
  background: linear-gradient(to bottom, #f97316, #ea580c);
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.4);
  animation: pulseDrift 1.5s ease-in-out infinite;
}

.pulse-collapse {
  background: linear-gradient(to bottom, #ef4444, #dc2626);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: pulseCollapse 0.8s ease-in-out infinite;
}

@keyframes pulseDrift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulseCollapse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
  }
}

.timeline-time-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 3px;
}

.timeline-time-markers span {
  font-size: 9px;
  color: #666;
  font-variant-numeric: tabular-nums;
}

/* =============================================================================
   ENTROPY PLAYBACK BAR - Real-time Audio Scrubber with Entropy Overlay
   ============================================================================= */
.entropy-playback-bar {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 15px 0 25px 0;
}

.epb-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #ec4899;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.epb-hint {
  font-weight: 400;
  color: #666;
  letter-spacing: 0.5px;
}

.epb-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.epb-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
  border: 2px solid rgba(236, 72, 153, 0.5);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.epb-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.epb-play-btn.playing {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.2));
  border-color: #22c55e;
  animation: playPulse 1s ease-in-out infinite;
}

@keyframes playPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.6); }
}

.epb-track {
  flex: 1;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  display: flex;
  gap: 1px;
  padding: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.epb-segment {
  flex: 1;
  border-radius: 2px;
  min-width: 2px;
  transition: opacity 0.1s ease;
}

.epb-segment:hover {
  opacity: 0.8;
}

.epb-stable {
  background: linear-gradient(to bottom, #22c55e, #16a34a);
}

.epb-rising {
  background: linear-gradient(to bottom, #eab308, #ca8a04);
}

.epb-drift {
  background: linear-gradient(to bottom, #f97316, #ea580c);
}

.epb-collapse {
  background: linear-gradient(to bottom, #ef4444, #dc2626);
  animation: collapseFlash 0.5s ease-in-out infinite alternate;
}

@keyframes collapseFlash {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

.epb-playhead {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 15px rgba(236, 72, 153, 0.6);
  pointer-events: none;
  z-index: 10;
  transition: left 0.05s linear;
}

.epb-time {
  font-size: 12px;
  color: #888;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
}

.epb-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 52px 0 52px;
}

.epb-markers span {
  font-size: 9px;
  color: #555;
  font-variant-numeric: tabular-nums;
}

/* Live indicator for real-time feedback */
.live-indicator {
  color: #ef4444;
  animation: liveBlink 1s ease-in-out infinite;
  margin-right: 6px;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Drift insight live state */
.drift-insight-display.rising {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.05);
  color: #fcd34d;
}

.drift-insight-display.drift {
  border-left-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  color: #fdba74;
}

/* =============================================================================
   INFO BUTTON TOGGLE
   ============================================================================= */
.explainer-toggle {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.info-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  color: #a78bfa;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.info-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
}

.info-btn.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: #8b5cf6;
}

.info-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
}

.explainer-section.collapsible {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   VOICE SUMMARY HERO - Centered, Prominent Result
   ============================================================================= */
.voice-summary-hero {
  text-align: center;
  padding: 30px 20px;
  margin-bottom: 25px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
}

.summary-badge-container {
  margin-bottom: 20px;
}

.judgment-hero-badge.animated {
  animation: badgePulse 2s ease-in-out infinite;
}

.judgment-hero-badge.animated.stable {
  animation: stablePulse 3s ease-in-out infinite;
}

.judgment-hero-badge.animated.tension {
  animation: tensionPulse 2s ease-in-out infinite;
}

.judgment-hero-badge.animated.friction {
  animation: frictionPulse 1.5s ease-in-out infinite;
}

.judgment-hero-badge.animated.collapse {
  animation: collapsePulse 1s ease-in-out infinite;
}

@keyframes stablePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
  50% { box-shadow: 0 0 20px 5px rgba(34, 197, 94, 0.3); }
}

@keyframes tensionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
  50% { box-shadow: 0 0 20px 5px rgba(234, 179, 8, 0.3); }
}

@keyframes frictionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
  50% { box-shadow: 0 0 25px 8px rgba(249, 115, 22, 0.4); }
}

@keyframes collapsePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 30px 10px rgba(239, 68, 68, 0.5); }
}

.summary-insight {
  font-size: 16px;
  line-height: 1.6;
  color: #ccc;
  max-width: 600px;
  margin: 0 auto 20px;
}

.summary-insight.stable { color: #86efac; }
.summary-insight.tension { color: #fcd34d; }
.summary-insight.friction { color: #fdba74; }
.summary-insight.collapse { color: #fca5a5; }

.summary-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 25px;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 15px;
}

.summary-timestamp.high {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.summary-timestamp.medium {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: #fdba74;
}

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

.summary-reflex {
  margin-top: 15px;
}

.reflex-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.reflex-badge.stir {
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

.reflex-badge.watch {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fcd34d;
  animation: watchGlow 2s ease-in-out infinite;
}

.reflex-badge.panic {
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #fdba74;
  animation: panicGlow 1.5s ease-in-out infinite;
}

.reflex-badge.collapse {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  animation: collapseGlow 1s ease-in-out infinite;
}

@keyframes watchGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(234, 179, 8, 0); }
  50% { box-shadow: 0 0 15px rgba(234, 179, 8, 0.4); }
}

@keyframes panicGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(249, 115, 22, 0); }
  50% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.5); }
}

@keyframes collapseGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.6); }
}

/* =============================================================================
   COLLAPSIBLE SECTIONS
   ============================================================================= */
.collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.collapsible-header:hover {
  opacity: 0.8;
}

.collapse-arrow {
  font-size: 10px;
  color: #666;
  transition: transform 0.2s ease;
}

.collapsible-content.collapsed {
  display: none;
}

/* =============================================================================
   MOBILE OPTIMIZATIONS
   ============================================================================= */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    padding: 20px 0 15px;
  }

  .title {
    font-size: 24px;
    letter-spacing: 2px;
  }

  /* Hide duplicate judgment badge on mobile */
  .mobile-hidden {
    display: none;
  }

  /* Stack main content vertically */
  .main-content {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
  }

  .transcript-section,
  .metrics-section {
    width: 100%;
  }

  /* Voice Summary Hero adjustments */
  .voice-summary-hero {
    padding: 20px 15px;
  }

  .summary-insight {
    font-size: 14px;
  }

  .judgment-hero-badge {
    font-size: 16px;
    padding: 12px 24px;
  }

  /* Collapse entropy section by default on mobile */
  .transcript-display {
    max-height: 300px;
    overflow-y: auto;
  }

  /* Smaller input zones */
  .input-options {
    flex-direction: column;
  }

  .dropzone,
  .record-zone {
    min-height: 100px;
  }

  .input-divider {
    padding: 10px 0;
  }

  /* Metrics compact view */
  .indicator-section {
    padding: 12px;
  }

  .indicator-row {
    font-size: 12px;
  }

  /* Privacy and clarification smaller */
  .privacy-notice,
  .input-clarification {
    padding: 10px 15px;
    font-size: 11px;
  }

  /* Explainer smaller */
  .explainer-section {
    padding: 15px;
  }

  .explainer-text {
    font-size: 12px;
  }

  /* Entropy playback bar responsive */
  .epb-container {
    flex-wrap: wrap;
  }

  .epb-time {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 20px;
  }

  .voice-summary-hero {
    padding: 15px 10px;
    margin-bottom: 15px;
  }

  .summary-insight {
    font-size: 13px;
  }

  .judgment-hero-badge {
    font-size: 14px;
    padding: 10px 20px;
  }

  .summary-timestamp {
    font-size: 11px;
    padding: 8px 15px;
  }

  .reflex-badge {
    font-size: 11px;
    padding: 6px 15px;
  }
}
