/* ============================================
   AI FEATURES STYLES
   ============================================ */

/* === AI TUTOR CHAT === */
.ai-tutor {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - 40px);
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-md) !important;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  flex-shrink: 0;
}

.ai-chat-header h1 {
  font-size: var(--font-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ai-chat-header h1 i {
  color: var(--domain2);
}

.ai-domain-select {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-sm);
}

/* Quick Prompts */
.ai-quick-prompts {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
  flex-shrink: 0;
}

.ai-quick-btn {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: var(--font-xs);
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.ai-quick-btn:hover {
  border-color: var(--domain2);
  color: var(--domain2);
  background: rgba(139, 92, 246, 0.08);
}

.ai-quick-btn i {
  margin-right: 4px;
}

/* Chat Messages */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ai-message {
  display: flex;
  gap: var(--space-sm);
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

.ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-message.ai {
  align-self: flex-start;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  flex-shrink: 0;
  color: white;
}

.ai-message.user .ai-message-avatar {
  background: var(--domain1);
}

.ai-message.ai .ai-message-avatar {
  background: var(--domain2);
}

.ai-message-content {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: var(--font-sm);
  line-height: 1.7;
  max-width: 100%;
  overflow-wrap: break-word;
}

.ai-message.user .ai-message-content {
  background: var(--domain1);
  color: white;
  border-bottom-right-radius: var(--radius-sm);
}

.ai-message.ai .ai-message-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-bottom-left-radius: var(--radius-sm);
}

.ai-message.ai .ai-message-content p { margin-bottom: var(--space-sm); }
.ai-message.ai .ai-message-content p:last-child { margin-bottom: 0; }
.ai-message.ai .ai-message-content strong { color: var(--text-primary); }
.ai-message.ai .ai-message-content ul,
.ai-message.ai .ai-message-content ol { margin: var(--space-sm) 0; padding-left: var(--space-lg); }
.ai-message.ai .ai-message-content li { margin-bottom: 4px; }
.ai-message.ai .ai-message-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: var(--font-xs);
}

.ai-message-time {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Typing Indicator */
.ai-typing {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-dim);
  font-size: var(--font-xs);
}

.ai-typing-dots {
  display: flex;
  gap: 4px;
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--domain2);
  animation: typingBounce 1.4s infinite;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* Chat Input */
.ai-chat-input {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) 0 0;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.ai-chat-input textarea {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-sm);
  resize: none;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.5;
}

.ai-chat-input textarea:focus {
  outline: none;
  border-color: var(--domain2);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.ai-chat-input .ai-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--domain2);
  color: white;
  font-size: var(--font-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-chat-input .ai-send-btn:hover {
  background: var(--domain2-dark);
  transform: scale(1.05);
}

.ai-chat-input .ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* === TEXT-TO-SPEECH CONTROLS === */
.tts-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.tts-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: var(--font-sm);
}

.tts-btn:hover {
  background: var(--domain1);
  color: white;
}

.tts-btn.active {
  background: var(--domain1);
  color: white;
}

.tts-label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-left: var(--space-xs);
}

.tts-speed {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--font-xs);
  font-family: var(--font-family);
  width: 65px;
}

.tts-reading {
  outline: 2px solid var(--domain1);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.05);
}

/* === YOUTUBE VIDEOS SECTION === */
.youtube-section {
  margin-top: var(--space-lg);
}

.youtube-section h2 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.youtube-section h2 i {
  color: #FF0000;
}

.youtube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.youtube-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.youtube-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #FF0000;
}

.youtube-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.youtube-card-info {
  padding: var(--space-sm) var(--space-md);
}

.youtube-card-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-card-channel {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.youtube-player {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.youtube-loading {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-dim);
}

/* === AI QUIZ GENERATOR === */
.ai-quiz-gen {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.ai-quiz-gen h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  color: var(--domain2);
}

.ai-quiz-gen p {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.ai-quiz-gen-controls {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.ai-gen-btn {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  border: none;
  background: var(--domain2);
  color: white;
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ai-gen-btn:hover {
  background: var(--domain2-dark);
  transform: translateY(-1px);
}

.ai-gen-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ai-gen-btn .spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* === DICTIONARY TOOLTIP === */
.dict-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  max-width: 350px;
  box-shadow: var(--shadow-xl);
  animation: fadeIn 0.2s ease;
}

.dict-tooltip-word {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dict-tooltip-phonetic {
  font-size: var(--font-xs);
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.dict-tooltip-def {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.dict-tooltip-pos {
  font-size: var(--font-xs);
  color: var(--domain2);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 4px;
}

.dict-tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: var(--font-sm);
}

/* === MERMAID DIAGRAMS === */
.mermaid-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  overflow-x: auto;
}

.mermaid-container .mermaid {
  display: flex;
  justify-content: center;
}

.mermaid-container svg {
  max-width: 100%;
}

/* === ASK AI BUTTON (on topic pages) === */
.ask-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.08);
  color: var(--domain2);
  font-family: var(--font-family);
  font-size: var(--font-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ask-ai-btn:hover {
  background: var(--domain2);
  color: white;
  border-color: var(--domain2);
}

.ask-ai-btn i {
  font-size: 11px;
}

/* === AI FEATURE BADGES === */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.1);
  color: var(--domain2);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* === STANDARD & TERM TOOLTIPS === */
.std-tooltip,
.term-tooltip {
  position: relative;
}

.std-tooltip:hover::after,
.std-tooltip:focus::after,
.term-tooltip:hover::after,
.term-tooltip:focus::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  border-radius: var(--radius-md);
  white-space: normal;
  width: max-content;
  max-width: 320px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  animation: fadeIn 0.15s ease;
}

.std-tooltip:hover::before,
.std-tooltip:focus::before,
.term-tooltip:hover::before,
.term-tooltip:focus::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-light);
  z-index: 101;
  pointer-events: none;
}

/* === VISUAL TOGGLE BUTTON === */
.visual-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.visual-toggle label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-switch.active {
  background: var(--domain2);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-switch.active::after {
  transform: translateX(16px);
}

/* === SVG CHART COMPONENTS === */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.chart-title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
}

/* Gauge Chart */
.gauge-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-chart svg {
  max-width: 200px;
}

.gauge-value {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-top: -20px;
}

.gauge-label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-top: 4px;
}

/* Bar Chart */
.bar-chart-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.bar-chart-label {
  width: 120px;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.bar-chart-track {
  flex: 1;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.bar-chart-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.bar-chart-value {
  font-size: 11px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

/* Donut Chart */
.donut-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donut-chart svg {
  max-width: 200px;
}

.donut-center {
  font-size: var(--font-xl);
  font-weight: 800;
  fill: var(--text-primary);
}

.donut-center-label {
  font-size: var(--font-xs);
  fill: var(--text-muted);
}

.donut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Sparkline */
.sparkline-container {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.sparkline-container svg {
  height: 30px;
}

.sparkline-value {
  font-size: var(--font-sm);
  font-weight: 700;
}

/* Fishbone Diagram */
.fishbone-container {
  overflow-x: auto;
  padding: var(--space-md) 0;
}

.fishbone-container svg text {
  font-family: var(--font-family);
}

/* Flow Chart */
.flowchart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: var(--space-md) 0;
}

.flow-node {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  text-align: center;
  min-width: 180px;
  max-width: 300px;
  transition: all 0.2s ease;
  cursor: default;
  border: 2px solid;
}

.flow-node:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.flow-node.process {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.flow-node.decision {
  background: rgba(251,191,36,0.08);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: rotate(0deg);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  padding: var(--space-lg) var(--space-xl);
}

.flow-node.start, .flow-node.end {
  background: rgba(59,130,246,0.08);
  border-color: var(--domain1);
  color: var(--domain1);
  border-radius: var(--radius-full);
}

.flow-arrow {
  color: var(--text-dim);
  font-size: var(--font-lg);
  padding: 4px 0;
}

/* Timeline */
.timeline-chart {
  position: relative;
  padding-left: 40px;
}

.timeline-chart::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-event {
  position: relative;
  margin-bottom: var(--space-lg);
  padding-left: var(--space-md);
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid;
  background: var(--bg-primary);
  z-index: 1;
}

.timeline-event-date {
  font-size: var(--font-xs);
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 2px;
}

.timeline-event-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.timeline-event-desc {
  font-size: var(--font-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* Image Generation */
.ai-image-section {
  margin-top: var(--space-md);
}

.ai-generated-image {
  max-width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.image-gen-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.08);
  color: var(--domain6);
  font-family: var(--font-family);
  font-size: var(--font-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.image-gen-btn:hover {
  background: var(--domain6);
  color: white;
  border-color: var(--domain6);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .ai-tutor {
    height: calc(100vh - var(--header-height) - 100px);
    padding: var(--space-sm) !important;
  }

  .ai-message {
    max-width: 92%;
  }

  .ai-quick-prompts {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .youtube-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .tts-controls {
    flex-wrap: wrap;
    border-radius: var(--radius-md);
  }
}

/* ============================================
   INFOGRAPHIC DIAGRAM STYLES
   ============================================ */

/* Diagram wrapper upgrade */
.ig-diagram-wrap {
  border: 1px solid rgba(128,128,128,0.12) !important;
  border-radius: 20px !important;
  padding: 28px !important;
  background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary)) !important;
  position: relative;
  overflow: hidden;
}

.ig-diagram-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

.ig-diagram-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(128,128,128,0.1);
}

.ig-diagram-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Infographic card hover glow */
.ig-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* Step flow animations */
@keyframes ig-step-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ig-pulse-line {
  0%, 100% { transform: translateY(-100%); opacity: 0; }
  50% { transform: translateY(300%); opacity: 0.6; }
}

/* PDCA responsive */
@media (max-width: 600px) {
  .ig-pdca > div:first-child {
    grid-template-columns: 1fr !important;
  }
}

/* Mind map responsive */
@media (max-width: 500px) {
  .ig-mindmap .ig-mm-branch {
    min-width: 100% !important;
  }
}

/* Pyramid responsive */
@media (max-width: 600px) {
  .ig-pyramid .ig-pyramid-level {
    width: 90% !important;
    font-size: 12px !important;
    padding: 12px 16px !important;
  }
}

/* Light theme adjustments */
[data-theme="light"] .ig-diagram-wrap {
  background: linear-gradient(145deg, #fff, #f8fafc) !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

[data-theme="light"] .ig-diagram-wrap::before {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.03), transparent);
}

/* Inline concept listen button */
.concept-listen-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: auto;
  margin-right: 8px;
  flex-shrink: 0;
}

.concept-listen-btn:hover {
  background: var(--domain1);
  color: white;
  border-color: var(--domain1);
  transform: scale(1.1);
}
