/* Truth From the Fringe - Symbolic Drift Analyzer */
/* EIDOS-powered fringe document analysis */

* {
  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;
  background-image:
    radial-gradient(ellipse at top, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
}

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

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

.title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #fff;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #f97316, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(249, 115, 22, 0.3);
}

.subtitle {
  font-size: 14px;
  color: #888;
  letter-spacing: 1px;
  font-style: italic;
}

/* Selection Section */
.selection-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.dropdown-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #666;
  text-transform: uppercase;
}

.document-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  color: #e0e0e0;
  min-width: 320px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.document-select:hover {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.document-select:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}

.document-select option {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 10px;
}

.analyze-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 8px;
  padding: 12px 24px;
  color: #f97316;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.analyze-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(236, 72, 153, 0.3));
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(249, 115, 22, 0.3);
}

.analyze-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

/* 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 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 25px;
}

@media (max-width: 1000px) {
  .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;
}

.document-title {
  font-size: 12px;
  color: #f97316;
  font-weight: 500;
}

.transcript-display {
  padding: 20px;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  line-height: 1.9;
  font-size: 14px;
  color: #ccc;
}

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

/* TruthScore */
.truthscore-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 15px;
}

.truthscore-bar {
  position: relative;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0 8px;
}

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

.truthscore-fill.high {
  background: linear-gradient(90deg, #22c55e, #4ade80);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.truthscore-fill.medium {
  background: linear-gradient(90deg, #eab308, #facc15);
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.truthscore-fill.low {
  background: linear-gradient(90deg, #f97316, #fb923c);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.truthscore-fill.critical {
  background: linear-gradient(90deg, #ef4444, #f87171);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  animation: truthscorePulse 1s ease-in-out infinite;
}

.truthscore-value {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.truthscore-label {
  font-size: 11px;
  color: #888;
  text-align: center;
}

/* Judgment Hero */
.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);
}

.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.suspicious {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
  animation: suspiciousPulse 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;
}

/* 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 */
.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;
  font-weight: 500;
}

.drift-insight-display.whisper {
  border-left-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
  color: #c4b5fd;
}

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

/* Entropy 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.critical { color: #ef4444; }

.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; }

.ind-value.reflex-trigger.none { color: #22c55e; }
.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.whisper { color: #a855f7; background: rgba(168, 85, 247, 0.12); padding: 2px 8px; border-radius: 4px; }
.ind-value.reflex-trigger.collapse { color: #ef4444; background: rgba(239, 68, 68, 0.15); padding: 2px 8px; border-radius: 4px; animation: reflexPulse 0.8s ease-in-out infinite; }

/* Token Highlighting with Flame Effect */
.entropy-token {
  position: relative;
  padding: 2px 4px;
  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.stable {
  color: #86efac;
}

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

.entropy-token.drift {
  background: rgba(249, 115, 22, 0.2);
  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.collapse {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(249, 115, 22, 0.3));
  border-bottom: 2px solid rgba(239, 68, 68, 0.8);
  color: #fecaca;
  text-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
  animation: flameBurn 0.8s ease-in-out infinite;
}

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

/* Legend */
.legend {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  font-size: 11px;
}

.legend-item {
  color: #888;
}

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

/* 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: #f97316;
  text-decoration: none;
}

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

.separator {
  margin: 0 10px;
}

/* Animations */
@keyframes flameBurn {
  0%, 100% {
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.4), 0 -2px 6px rgba(249, 115, 22, 0.3);
    transform: scale(1);
  }
  25% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6), 0 -4px 10px rgba(249, 115, 22, 0.5);
  }
  50% {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.7), 0 -6px 14px rgba(249, 115, 22, 0.6);
    transform: scale(1.02);
  }
  75% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5), 0 -3px 8px rgba(249, 115, 22, 0.4);
  }
}

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

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

@keyframes suspiciousPulse {
  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 collapsePulse {
  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 reflexPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Scrollbar */
.transcript-display::-webkit-scrollbar {
  width: 8px;
}

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

.transcript-display::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.transcript-display::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== NEW UX UPGRADES ===== */

/* Explainer Bar */
.explainer-bar {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  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: 10px;
  padding: 16px 20px;
  margin-bottom: 25px;
}

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

.explainer-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explainer-main {
  font-size: 13px;
  line-height: 1.6;
  color: #c4b5fd;
}

.explainer-main strong {
  color: #e9d5ff;
}

.explainer-main em {
  color: #f97316;
  font-style: normal;
  font-weight: 500;
}

.collapse-def {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.explainer-note {
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
}

/* Explainer Section Wrapper */
.explainer-section {
  margin-bottom: 30px;
}

.explainer-section .explainer-bar {
  margin-bottom: 16px;
}

/* Use Cases */
.use-cases {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.use-cases-title {
  font-size: 11px;
  font-weight: 600;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.use-cases-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.use-cases-list li {
  font-size: 12px;
  color: #a5b4fc;
  position: relative;
  padding-left: 16px;
}

.use-cases-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #60a5fa;
}

/* Experimental Disclaimer */
.experimental-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
}

.disclaimer-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.disclaimer-text {
  font-size: 11px;
  color: #fcd34d;
  line-height: 1.5;
}

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

/* Help Tooltips */
.help-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 700;
  color: #888;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  margin-left: 6px;
  cursor: help;
  position: relative;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.help-tooltip:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.help-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(15, 15, 20, 0.98);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  color: #e0e0e0;
  width: 240px;
  white-space: normal;
  text-align: left;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.help-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Enhanced Legend */
.legend-enhanced {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 20px;
  margin-top: 25px;
}

.legend-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 15px;
  text-align: center;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

@media (max-width: 800px) {
  .legend-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .legend-grid {
    grid-template-columns: 1fr;
  }
}

.legend-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.legend-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

.legend-color {
  font-size: 20px;
  flex-shrink: 0;
}

.legend-card.stable .legend-color { color: #22c55e; }
.legend-card.tension .legend-color { color: #eab308; }
.legend-card.drift .legend-color { color: #f97316; }
.legend-card.collapse .legend-color {
  color: #ef4444;
  animation: legendFlame 1s ease-in-out infinite;
}

@keyframes legendFlame {
  0%, 100% { text-shadow: 0 0 4px rgba(239, 68, 68, 0.5); }
  50% { text-shadow: 0 0 12px rgba(239, 68, 68, 0.9), 0 -2px 8px rgba(249, 115, 22, 0.6); }
}

.legend-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legend-name {
  font-size: 12px;
  font-weight: 600;
  color: #e0e0e0;
}

.legend-desc {
  font-size: 10px;
  color: #888;
  line-height: 1.4;
}

/* Responsive Explainer */
@media (max-width: 600px) {
  .explainer-bar {
    flex-direction: column;
    text-align: center;
  }

  .explainer-icon {
    align-self: center;
  }

  .use-cases-list {
    grid-template-columns: 1fr;
  }

  .experimental-disclaimer {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .help-tooltip::after {
    left: auto;
    right: 0;
    transform: none;
  }
}

/* ===== COLLAPSE FACTORS - FORENSIC BREAKDOWN ===== */

.collapse-factors-section {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(249, 115, 22, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.collapse-factors-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.collapse-factor {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border-left: 3px solid #f97316;
  transition: all 0.2s ease;
}

.collapse-factor:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateX(4px);
}

.collapse-factor.is-collapse {
  border-left-color: #ef4444;
  animation: factorPulse 2s ease-in-out infinite;
}

.collapse-factor.is-drift {
  border-left-color: #eab308;
}

@keyframes factorPulse {
  0%, 100% { box-shadow: inset 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.15); }
}

.factor-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.factor-content {
  flex: 1;
  min-width: 0;
}

.factor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.factor-token {
  font-size: 12px;
  font-weight: 600;
  color: #fca5a5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.factor-entropy {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.factor-label {
  font-size: 11px;
  font-weight: 600;
  color: #f97316;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.factor-reason {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

.collapse-disclaimer {
  margin-top: 15px;
  padding: 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: #c4b5fd;
  text-align: center;
}

.collapse-disclaimer strong {
  color: #e9d5ff;
}

/* ===== AUDIO WAVEFORM VISUALIZER ===== */

.waveform-container {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  animation: waveformFadeIn 0.3s ease;
}

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

.waveform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.waveform-title {
  font-size: 14px;
  font-weight: 600;
  color: #22c55e;
}

.waveform-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #888;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.waveform-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.waveform-display {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

#waveformCanvas {
  width: 100%;
  height: 120px;
  display: block;
}

.waveform-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(34, 197, 94, 0.1) 0%,
    transparent 20%,
    transparent 80%,
    rgba(239, 68, 68, 0.1) 100%
  );
}

.waveform-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.waveform-play-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.waveform-play-btn:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.2));
  transform: scale(1.05);
}

.waveform-progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.waveform-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.waveform-time {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  min-width: 40px;
}

.waveform-entropy-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.entropy-label {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.entropy-meter {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.entropy-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 4px;
  transition: width 0.1s ease, background 0.3s ease;
}

.entropy-value {
  font-size: 14px;
  font-weight: 700;
  color: #22c55e;
  min-width: 45px;
  text-align: right;
}

/* ===== TRUTH FRAGMENT PLAYGROUND ===== */

.playground-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

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

.playground-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

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

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

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

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(236, 72, 153, 0.15));
  border-color: rgba(249, 115, 22, 0.4);
  color: #f97316;
}

.fragment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

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

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

.fragment-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.fragment-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 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;
}

.fragment-card:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.fragment-content {
  flex: 1;
  min-width: 0;
}

.fragment-quote {
  font-size: 13px;
  color: #e0e0e0;
  line-height: 1.5;
  margin-bottom: 8px;
  font-style: italic;
}

.fragment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.fragment-source {
  font-size: 11px;
  font-weight: 600;
  color: #f97316;
}

.audio-badge {
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  color: #22c55e;
  font-weight: 600;
}

.fragment-context {
  font-size: 10px;
  color: #666;
}

.fragment-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.fragment-audio-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fragment-audio-btn:hover {
  background: rgba(34, 197, 94, 0.25);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.fragment-audio-btn.playing {
  background: rgba(34, 197, 94, 0.3);
  animation: audioPulse 1s ease-in-out infinite;
}

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

.fragment-card.has-audio {
  border-color: rgba(34, 197, 94, 0.15);
}

.fragment-card.has-audio:hover {
  border-color: rgba(34, 197, 94, 0.4);
}

.fragment-test-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: #f97316;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fragment-test-btn:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(236, 72, 153, 0.25));
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(249, 115, 22, 0.3);
}

/* 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;
}

/* =============================================================================
   CUSTOM TEXT INPUT SECTION
   ============================================================================= */
.custom-input-section {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
}

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

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

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

.text-input-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-text-input {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s ease;
}

.custom-text-input::placeholder {
  color: #666;
  font-style: italic;
}

.custom-text-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.char-count {
  font-size: 11px;
  color: #666;
  letter-spacing: 1px;
}

.input-actions {
  display: flex;
  gap: 10px;
}

.clear-text-btn {
  padding: 10px 20px;
  background: rgba(100, 100, 100, 0.2);
  border: 1px solid rgba(150, 150, 150, 0.3);
  border-radius: 6px;
  color: #888;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-text-btn:hover {
  background: rgba(150, 150, 150, 0.3);
  color: #ccc;
}

.analyze-text-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 25px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.3));
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 6px;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.analyze-text-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.analyze-text-btn:not(:disabled):hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(236, 72, 153, 0.5));
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

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

.analyze-text-btn .btn-text {
  letter-spacing: 2px;
}

.upload-preview {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 20px;
  margin-top: 15px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.preview-filename {
  font-size: 14px;
  color: #22c55e;
  font-weight: 500;
}

.preview-remove {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.preview-remove:hover {
  background: rgba(239, 68, 68, 0.4);
}

.preview-actions {
  margin-top: 15px;
  text-align: center;
}

.analyze-upload-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.analyze-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

#uploadedAudio, #uploadedVideo {
  border-radius: 8px;
  background: #111;
}

/* Responsive Playground */
@media (max-width: 600px) {
  .fragment-grid {
    grid-template-columns: 1fr;
    max-height: 300px;
  }

  .fragment-card {
    flex-direction: column;
    text-align: center;
  }

  .fragment-test-btn {
    align-self: center;
    margin-top: 10px;
  }
}

/* =============================================================================
   LLM BELIEF SCANNER - NEW STYLES
   ============================================================================= */

/* Core Warning Banner */
.core-warning {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(249, 115, 22, 0.1));
  border: 2px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 25px;
  animation: warningPulse 3s ease-in-out infinite;
}

@keyframes warningPulse {
  0%, 100% { border-color: rgba(239, 68, 68, 0.4); }
  50% { border-color: rgba(239, 68, 68, 0.7); }
}

.warning-icon {
  font-size: 32px;
  flex-shrink: 0;
  animation: iconPulse 2s ease-in-out infinite;
}

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

.warning-content {
  flex: 1;
}

.warning-headline {
  font-size: 18px;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.warning-body {
  font-size: 14px;
  color: #d1d5db;
  line-height: 1.6;
  margin: 0;
}

.warning-body + .warning-body {
  margin-top: 4px;
}

/* Explainer Section */
.explainer-section {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
}

.explainer-bar {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.explainer-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.explainer-content {
  flex: 1;
}

.explainer-main {
  font-size: 15px;
  line-height: 1.7;
  color: #e0e0e0;
  margin-bottom: 12px;
}

.explainer-highlight {
  font-size: 14px;
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  border-left: 3px solid #f97316;
  padding: 10px 15px;
  margin-bottom: 12px;
  border-radius: 0 6px 6px 0;
}

.explainer-note {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.6;
}

.use-cases {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 15px;
}

.use-cases-title {
  font-size: 12px;
  font-weight: 600;
  color: #8b5cf6;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.use-cases-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.use-cases-list li {
  font-size: 12px;
  color: #b0b0b0;
  padding-left: 20px;
  position: relative;
}

.use-cases-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #8b5cf6;
}

.experimental-disclaimer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: #facc15;
}

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

/* Belief Input Section */
.belief-input-section {
  background: rgba(249, 115, 22, 0.05);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}

.belief-text-input {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(249, 115, 22, 0.3);
  border-radius: 10px;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s ease;
}

.belief-text-input::placeholder {
  color: #666;
  font-style: italic;
}

.belief-text-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

/* Verdict Section */
.verdict-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* AI Reasoning Section */
.ai-reasoning-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-reasoning-display {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #c4b5fd;
  font-style: italic;
  margin-top: 12px;
}

/* Meaning Section */
.meaning-section {
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.meaning-display {
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-top: 10px;
}

.meaning-text {
  font-size: 12px;
  line-height: 1.7;
  color: #a0a0a0;
}

/* Help Tooltip */
.help-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 10px;
  color: #888;
  cursor: help;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.help-tooltip:hover {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

/* Enhanced Legend */
.legend-enhanced {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin-top: 30px;
}

.legend-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #888;
  text-transform: uppercase;
  text-align: center;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.legend-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 3px solid currentColor;
}

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

.legend-card.tension {
  color: #eab308;
  border-color: #eab308;
}

.legend-card.drift {
  color: #f97316;
  border-color: #f97316;
}

.legend-card.collapse {
  color: #ef4444;
  border-color: #ef4444;
}

.legend-color {
  font-size: 16px;
}

.legend-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legend-name {
  font-size: 12px;
  font-weight: 600;
  color: inherit;
}

.legend-desc {
  font-size: 10px;
  color: #888;
}

/* Judgment Badge Extra States */
.judgment-hero-badge.stable {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.08));
  border-color: #22c55e;
  color: #22c55e;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.judgment-hero-badge.caution {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(234, 179, 8, 0.08));
  border-color: #eab308;
  color: #eab308;
  text-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.judgment-hero-badge.warning {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.08));
  border-color: #f97316;
  color: #f97316;
  text-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.judgment-hero-badge.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08));
  border-color: #ef4444;
  color: #ef4444;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  animation: judgmentPulse 2s ease-in-out infinite;
}

/* Claim Text Display */
.claim-text {
  font-size: 16px;
  line-height: 1.8;
  color: #e0e0e0;
}

.original-claim {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  display: block;
  padding: 15px;
  background: rgba(249, 115, 22, 0.1);
  border-left: 4px solid #f97316;
  border-radius: 0 8px 8px 0;
}

/* Input Entropy Display */
.input-entropy-explainer {
  font-size: 12px;
  color: #9ca3af;
  padding: 10px 16px;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.input-entropy-explainer strong {
  color: #c4b5fd;
}

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

.claim-tokens {
  font-size: 18px;
  line-height: 2;
  padding: 10px 0;
}

.claim-tokens .entropy-token {
  font-size: 18px;
  padding: 4px 2px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.claim-tokens .entropy-token:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ai-brief {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.6;
  font-style: italic;
  margin: 0;
}

/* Drift Detection Styles */
.drift-point {
  position: relative;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: #ef4444;
}

.drift-point::after {
  content: '⚡';
  font-size: 10px;
  position: absolute;
  top: -8px;
  right: -4px;
}

.drift-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  animation: driftPulse 2s ease-in-out infinite;
}

@keyframes driftPulse {
  0%, 100% { border-color: rgba(239, 68, 68, 0.3); }
  50% { border-color: rgba(239, 68, 68, 0.6); }
}

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

.drift-text {
  font-size: 12px;
  color: #fca5a5;
  line-height: 1.5;
}

/* Pure User Input Display */
.user-input-display {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 4px solid #8b5cf6;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* User's Original Claim */
.user-claim-display {
  font-size: 16px;
  font-weight: 500;
  color: #9ca3af;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid #6b7280;
  border-radius: 0 6px 6px 0;
  margin-bottom: 20px;
  line-height: 1.5;
  font-style: italic;
}

/* Assertion Section Header */
.assertion-header {
  color: #22c55e !important;
  margin-top: 25px;
}

.assertion-note {
  font-size: 11px;
  color: #666;
  margin-bottom: 12px;
  font-style: italic;
}

/* Entropy Bar Visualization */
.entropy-bar-section {
  margin: 15px 0;
}

.entropy-bar-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.entropy-bar-visual {
  display: flex;
  gap: 2px;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 3px;
  overflow: hidden;
}

.entropy-segment {
  flex: 1;
  border-radius: 2px;
  min-width: 4px;
  transition: all 0.2s ease;
}

.entropy-segment:hover {
  transform: scaleY(1.2);
}

.entropy-segment.stable { background: linear-gradient(to bottom, #22c55e, #16a34a); }
.entropy-segment.tension { background: linear-gradient(to bottom, #eab308, #ca8a04); }
.entropy-segment.drift { background: linear-gradient(to bottom, #f97316, #ea580c); }
.entropy-segment.collapse { background: linear-gradient(to bottom, #ef4444, #dc2626); }

/* Symbolic Reflex Tags */
.reflex-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 15px;
}

.reflex-tag.saturated {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.reflex-tag.edge {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fcd34d;
}

.reflex-tag.tension {
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fdba74;
}

.reflex-tag.friction {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  animation: frictionPulse 1.5s ease-in-out infinite;
}

@keyframes frictionPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.3); }
}

/* =============================================================================
   AI RATING BADGE - Semantic Judgment Display
   ============================================================================= */
.ai-rating-section {
  margin: 20px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  text-align: center;
}

.ai-rating-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ai-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.rating-icon {
  font-size: 28px;
}

.rating-text {
  text-transform: uppercase;
}

.ai-rating-badge.rating-true {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.1));
  border: 2px solid rgba(34, 197, 94, 0.6);
  color: #86efac;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.ai-rating-badge.rating-false {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.1));
  border: 2px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
  animation: falsePulse 2s ease-in-out infinite;
}

@keyframes falsePulse {
  0%, 100% { border-color: rgba(239, 68, 68, 0.6); }
  50% { border-color: rgba(239, 68, 68, 0.9); }
}

.ai-rating-badge.rating-uncertain {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(234, 179, 8, 0.1));
  border: 2px solid rgba(234, 179, 8, 0.6);
  color: #fcd34d;
  text-shadow: 0 0 20px rgba(234, 179, 8, 0.5);
}

.ai-rating-badge.rating-contested {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(139, 92, 246, 0.15));
  border: 2px solid rgba(249, 115, 22, 0.6);
  color: #fdba74;
  text-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
  animation: contestedPulse 3s ease-in-out infinite;
}

@keyframes contestedPulse {
  0%, 100% { border-color: rgba(249, 115, 22, 0.6); }
  50% { border-color: rgba(139, 92, 246, 0.6); }
}

.ai-rating-desc {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

/* Entropy Bar Explainer */
.entropy-bar-explainer {
  font-size: 10px;
  color: #666;
  margin-top: 6px;
  text-align: center;
}

/* =============================================================================
   RESPONSE SECTION - AI's reaction display
   ============================================================================= */
.response-section {
  margin: 20px 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border-left: 3px solid #8b5cf6;
}

.response-header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #8b5cf6;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.response-tokens {
  font-size: 15px;
  line-height: 2;
  color: #e0e0e0;
}

.response-text {
  font-size: 15px;
  line-height: 1.8;
  color: #e0e0e0;
  font-style: italic;
}

/* =============================================================================
   STRESS POINTS - Where the model flinched
   ============================================================================= */
.stress-points-section {
  margin: 20px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(239, 68, 68, 0.08));
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 10px;
}

.stress-header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #f97316;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.stress-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.stress-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.stress-tag.severity-high {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  animation: stressPulse 1.5s ease-in-out infinite;
}

.stress-tag.severity-medium {
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #fdba74;
}

.stress-tag.severity-low {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fcd34d;
}

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

.stress-entropy {
  font-size: 10px;
  opacity: 0.7;
  font-weight: 600;
}

.stress-explainer {
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
}

/* Stress point token highlight */
.entropy-token.stress-point {
  position: relative;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: #ef4444;
  animation: stressGlow 2s ease-in-out infinite;
}

@keyframes stressGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { text-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
}

/* =============================================================================
   USER TOKENS DISPLAY - Echo entropy highlighting
   ============================================================================= */
.user-tokens-display {
  font-size: 20px;
  line-height: 2;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-bottom: 15px;
}

.user-tokens-display .entropy-token {
  font-size: 20px;
  padding: 4px 2px;
}

/* Drift point marker */
.entropy-token.drift-point {
  border-bottom: 2px solid #f97316;
  position: relative;
}

.entropy-token.drift-point::after {
  content: '↑';
  font-size: 10px;
  color: #f97316;
  position: absolute;
  top: -10px;
  right: 0;
}

/* =============================================================================
   EMOTIONAL REFLEX WARNING
   ============================================================================= */
.emotional-reflex-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin: 15px 0;
  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);
  border-radius: 10px;
  animation: reflexPulse 2s ease-in-out infinite;
}

@keyframes reflexPulse {
  0%, 100% { border-color: rgba(139, 92, 246, 0.4); }
  50% { border-color: rgba(236, 72, 153, 0.6); }
}

.emotional-reflex-warning .reflex-icon {
  font-size: 24px;
}

.emotional-reflex-warning .reflex-text {
  font-size: 13px;
  color: #c4b5fd;
}

.emotional-reflex-warning .reflex-text strong {
  color: #e9d5ff;
}

.entropy-note {
  font-size: 10px;
  font-weight: 400;
  color: #888;
  letter-spacing: 0;
}

.reasoning-explainer {
  font-size: 11px;
  color: #888;
  margin: 8px 0 12px 0;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .explainer-bar {
    flex-direction: column;
    text-align: center;
  }

  .use-cases-list {
    grid-template-columns: 1fr;
  }

  .legend-grid {
    grid-template-columns: 1fr 1fr;
  }
}
