/* Modern Styles for Pryon Demo Hub */

/* Fonts and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #374151;
  overflow-x: hidden;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Full-height sticky navigation sidebar */
#toc-sidebar {
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  /* Account for main nav height and add spacing */
  top: 6rem !important;
  max-height: calc(100vh - 8rem);
}

/* Enhanced sidebar styling when scrolled */
#toc-sidebar:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(139, 92, 246, 0.2);
}

/* Custom scrollbar for the navigation list */
#toc-list::-webkit-scrollbar {
  width: 6px;
}

#toc-list::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.1);
  border-radius: 3px;
}

#toc-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  border-radius: 3px;
}

#toc-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #7C3AED, #2563EB);
}

/* Hero Section Styles */
.hero-btn {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hero-btn.primary {
  background: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
}

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.15);
}

/* WebGL Background Canvas */
#webgl-background {
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Hide fallback when WebGL is supported */
.webgl-supported .webgl-fallback {
  display: none;
}

/* Animated particles background (fallback) */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particles::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Navigation Styles */
nav {
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Enhanced nav visibility on scroll */
nav.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.nav-link {
  position: relative;
  font-weight: 600;
  color: #374151 !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 50%;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #8B5CF6 !important;
}

/* Card Styles */
.demo-card {
  background: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure consistent height */
}

.demo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.demo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.demo-card:hover::before {
  transform: scaleX(1);
}

/* Original icon style for backward compatibility */
.demo-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* New compact header layout */
.demo-card-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.demo-card-icon-compact {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.demo-card-header-content {
  flex: 1;
  min-width: 0; /* Allow text truncation */
}

.demo-card-description {
  margin-bottom: 1rem;
}

.demo-card-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: auto; /* Push buttons to bottom of card */
  min-height: 44px; /* Ensure consistent button container height */
}

.demo-card-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 44px; /* Ensure consistent button height */
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-card-btn.primary {
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.demo-card-btn.secondary {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.demo-card-btn.info {
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.2);
  flex: 0 0 auto;
  min-width: 80px; /* Consistent minimum width for info button */
  padding: 0.75rem;
}

/* Disabled/Ghosted button states */
.demo-card-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

.demo-card-btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

.demo-card-btn:hover {
  transform: translateY(-2px);
}

.demo-card-btn.primary:hover {
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.demo-card-btn.info:hover {
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.demo-card-btn.secondary:hover {
  background: rgba(139, 92, 246, 0.15);
}

/* Modal Styles */
#demo-modal {
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

#demo-modal.active {
  visibility: visible;
  opacity: 1;
}

#demo-modal.active .relative {
  transform: scale(1);
}

#demo-modal.maximized .relative {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

/* Symphony Modal Styles */
#symphony-modal {
  transition: all 0.3s ease;
}

#symphony-modal.active {
  opacity: 1;
}

#symphony-modal.active .relative {
  transform: scale(1);
}

#symphony-modal .relative {
  display: flex;
  flex-direction: column;
}

/* Symphony Section Styles */
.symphony-feature {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.05));
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

/* Input and Form Styles */
input[type="text"], select {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

input[type="text"]:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .hero-btn {
    width: 100%;
    justify-content: center;
  }
  
  .demo-card-buttons {
    flex-direction: column;
  }
  
  .demo-card-btn {
    width: 100%;
  }

  /* Compact header adjustments for mobile */
  .demo-card-header {
    gap: 0.75rem;
  }
  
  .demo-card-icon-compact {
    width: 40px;
    height: 40px;
  }
  
  .demo-card-header-content h3 {
    font-size: 1rem;
  }
  
  .demo-card-header-content .text-sm {
    font-size: 0.75rem;
  }

  /* Symphony modal mobile adjustments */
  #symphony-modal .relative {
    width: 95%;
    height: 90%;
  }
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #8B5CF6;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #7C3AED, #2563EB);
}

/* Focus States */
button:focus, input:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .demo-card {
    border: 2px solid #000;
  }
  
  .hero-btn {
    border: 2px solid #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .particles::before {
    animation: none;
  }
}

/* Template Card Styles */
.template-card {
  position: relative;
  overflow: hidden;
}

.template-card:hover {
  transform: translateY(-4px);
}

/* Modal Styles */
.modal.active {
  opacity: 1 !important;
}

.modal.active .transform {
  transform: scale(1) !important;
}

#demo-info-modal.active {
  opacity: 1 !important;
}

#demo-info-modal.active .transform {
  transform: scale(1) !important;
}

/* Comprehensive Descriptor Card Styling */
.descriptor-card-section {
  border-bottom: 1px solid #e5e7eb;
}

.descriptor-card-section:last-child {
  border-bottom: none;
}

.descriptor-card-pane h3 {
  position: relative;
  padding-bottom: 8px;
}

.descriptor-card-pane h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, currentColor, transparent);
}

/* Enhanced card styling */
.descriptor-card-item {
  transition: all 0.2s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.descriptor-card-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Chip styling improvements */
.descriptor-chip {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.descriptor-chip:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Performance metrics styling */
.performance-metric {
  padding: 0.5rem;
  background: rgba(255,255,255,0.7);
  border-radius: 0.5rem;
  border-left: 3px solid #8b5cf6;
}

/* Talk tracks styling */
.talk-track-item {
  padding: 0.5rem;
  background: rgba(255,255,255,0.5);
  border-radius: 0.375rem;
  border-left: 2px solid #6366f1;
  margin-bottom: 0.5rem;
}

/* Enhanced button styling */
.demo-cta-button {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
}

.demo-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* QR code placeholder styling */
.qr-placeholder {
  background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
              linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
              linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
}

/* Animation for modal content */
.modal-fade-in {
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive improvements for descriptor card */
@media (max-width: 768px) {
  #demo-info-modal .relative {
    max-width: 95vw;
    max-height: 95vh;
    margin: 1rem;
  }
  
  .descriptor-card-pane {
    padding: 1rem;
  }
  
  .descriptor-card-pane h3 {
    font-size: 1rem;
  }
  
  .grid.lg\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid.lg\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  z-index: 1;
}

/* Template filter badges */
.complexity-badge {
  position: relative;
  overflow: hidden;
}

.complexity-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.complexity-badge:hover::before {
  left: 100%;
}

/* Enhanced button animations */
.template-card button:hover,
.template-card a:hover {
  animation: buttonPulse 0.3s ease-in-out;
}

@keyframes buttonPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Table of Contents Styles */
.toc-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  color: #374151;
}

.toc-item:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateX(4px);
  color: #8B5CF6;
}

.toc-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
  border-color: rgba(139, 92, 246, 0.3);
  color: #8B5CF6;
  font-weight: 600;
}

.toc-item .complexity-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
  margin-left: auto;
}

.toc-item .template-title {
  font-weight: 500;
  line-height: 1.3;
}

.toc-item .template-category {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: 2px;
}

/* Smooth scroll for template navigation */
.template-card {
  scroll-margin-top: 120px;
}

/* Custom scrollbar for TOC - removed duplicate, using styles from top of file */

/* Print styles */
@media print {
  .hero-btn, .demo-card-btn, nav, footer {
    display: none !important;
  }
  
  .demo-card, .template-card {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Chat Interface Enhancements */
.chat-message {
  animation: slideIn 0.3s ease-out;
}

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

/* Enhanced prose styling for chat messages */
.prose code {
  background-color: rgba(139, 92, 246, 0.1);
  color: rgb(139, 92, 246);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-weight: 500;
}

.prose pre {
  background-color: rgb(31, 41, 55);
  color: rgb(243, 244, 246);
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgb(55, 65, 81);
  position: relative;
}

.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border: none;
  font-weight: normal;
}

.prose blockquote {
  border-left: 4px solid rgb(139, 92, 246);
  background-color: rgba(139, 92, 246, 0.05);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  font-style: italic;
}

.prose ul, .prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgb(31, 41, 55);
}

.prose h1 { font-size: 1.875rem; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 1.125rem; }
.prose h5 { font-size: 1rem; }
.prose h6 { font-size: 0.875rem; }

.prose p {
  margin: 1rem 0;
  line-height: 1.7;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 600;
  color: rgb(31, 41, 55);
}

.prose em {
  font-style: italic;
  color: rgb(75, 85, 99);
}

.prose a {
  color: rgb(139, 92, 246);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: rgb(124, 58, 237);
  text-decoration: underline;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.prose th,
.prose td {
  border: 1px solid rgb(209, 213, 219);
  padding: 0.75rem;
  text-align: left;
}

.prose th {
  background-color: rgb(249, 250, 251);
  font-weight: 600;
  color: rgb(31, 41, 55);
}

.prose td {
  background-color: white;
}

.prose tr:nth-child(even) td {
  background-color: rgb(249, 250, 251);
}

.prose del,
.prose s {
  color: rgb(107, 114, 128);
  text-decoration: line-through;
}

/* Chat input focus styling */
#symphony-chat-input:focus {
  ring-color: rgb(139, 92, 246);
  border-color: rgb(139, 92, 246);
}

/* Smooth scrolling for chat container */
#symphony-chat-messages {
  scroll-behavior: smooth;
}

/* Custom scrollbar for chat */
#symphony-chat-messages::-webkit-scrollbar {
  width: 6px;
}

#symphony-chat-messages::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

#symphony-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#symphony-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Line clamp utility for text truncation */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hover effects for interactive elements */
.hover\:bg-gray-100:hover {
  background-color: rgb(243, 244, 246);
}

/* Message bubble styling improvements */
.message-bubble {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.message-bubble:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Avatar styling */
.chat-avatar {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Timestamp styling */
.chat-timestamp {
  opacity: 0.7;
  transition: opacity 0.2s ease-in-out;
}

.flex:hover .chat-timestamp {
  opacity: 1;
}

/* Enhanced styling for chat message prose */
.message-bubble .prose {
  font-size: 0.875rem;
}

.message-bubble .prose p {
  margin: 0.75rem 0;
}

.message-bubble .prose p:first-child {
  margin-top: 0;
}

.message-bubble .prose p:last-child {
  margin-bottom: 0;
}

.message-bubble .prose h1,
.message-bubble .prose h2,
.message-bubble .prose h3,
.message-bubble .prose h4,
.message-bubble .prose h5,
.message-bubble .prose h6 {
  margin: 1.5rem 0 0.75rem 0;
  font-weight: 700;
}

.message-bubble .prose h1:first-child,
.message-bubble .prose h2:first-child,
.message-bubble .prose h3:first-child,
.message-bubble .prose h4:first-child,
.message-bubble .prose h5:first-child,
.message-bubble .prose h6:first-child {
  margin-top: 0;
}

.message-bubble .prose ul,
.message-bubble .prose ol {
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.message-bubble .prose li {
  margin: 0.25rem 0;
}

.message-bubble .prose code {
  font-size: 0.8125rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.message-bubble .prose pre {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

.message-bubble .prose blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
}

/* User message specific styles (white text) */
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose h1,
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose h2,
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose h3,
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose h4,
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose h5,
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose h6 {
  color: white !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose strong {
  color: white !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose code {
  color: rgb(196, 181, 253) !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose pre {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose a {
  color: rgb(191, 219, 254) !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose a:hover {
  color: rgb(147, 197, 253) !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose blockquote {
  border-left-color: rgba(255, 255, 255, 0.4) !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.message-bubble .prose table {
  font-size: 0.8125rem;
  margin: 1rem 0;
}

.message-bubble .prose th,
.message-bubble .prose td {
  padding: 0.5rem;
}

/* Table styles for user messages (dark background) */
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose th {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose td {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-gradient-to-r.from-purple-600.to-blue-600 .prose del,
.bg-gradient-to-r.from-purple-600.to-blue-600 .prose s {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Source Citation Styles */
.source-citation {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6) !important;
  color: white !important;
  border-radius: 50% !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  margin: 0 2px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  text-align: center !important;
  min-width: 18px !important;
  min-height: 18px !important;
  transition: all 0.2s ease !important;
  cursor: default !important;
  user-select: none !important;
}

.source-citation:hover {
  background: linear-gradient(135deg, #7C3AED, #2563EB) !important;
  transform: scale(1.1) !important;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4) !important;
}

/* Ensure proper spacing for consecutive source citations */
.source-citation + .source-citation {
  margin-left: 1px !important;
}

/* Ensure source citations work well within message bubbles */
.message-bubble .source-citation {
  vertical-align: baseline !important;
  position: relative !important;
  top: -2px !important;
}

/* Ensure source citations don't break text flow */
.prose .source-citation {
  display: inline-flex !important;
  margin: 0 1px !important;
}

/* Symphony Enhanced Thinking Indicator Styles */
.symphony-thinking-container {
  animation: slideInUp 0.4s ease-out;
}

.symphony-thinking-bubble {
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.thinking-progress-bar {
  transition: width 1s ease-out;
  background: linear-gradient(90deg, #8B5CF6, #3B82F6, #06B6D4);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.feature-spotlight .feature-text,
.feature-spotlight .feature-icon {
  transition: opacity 0.3s ease-in-out;
}

.feature-spotlight .feature-icon svg {
  transition: transform 0.3s ease-in-out;
}

.feature-spotlight .feature-icon:hover svg {
  transform: scale(1.1);
}

.cancel-option {
  transition: opacity 0.3s ease-in-out;
}

.cancel-option button:hover {
  background-color: rgba(239, 68, 68, 0.05);
  border-radius: 4px;
  padding: 2px 4px;
}

.thinking-timer {
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  text-align: right;
}

.thinking-status-text {
  font-weight: 500;
  color: #6b7280;
}

/* Breathing animation for the thinking bubble */
.symphony-thinking-bubble {
  animation: breathe 3s ease-in-out infinite;
}

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

/* Enhanced slide in animation */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress bar glow effect */
.thinking-progress-bar {
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* Feature text animation enhancement */
.feature-text {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

/* Hover effects for the thinking container */
.symphony-thinking-container:hover .symphony-thinking-bubble {
  box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .symphony-thinking-bubble {
    max-width: 100%;
    margin-right: 1rem;
  }
  
  .feature-text {
    font-size: 0.875rem;
    line-height: 1.4;
  }
  
  .thinking-timer {
    min-width: 16px;
    font-size: 0.75rem;
  }
}
