/* ===================================================
   LLM Interactive Diagrams Styles
   Used across Local LLM 201-209 posts
   =================================================== */

.llm-diagram-container {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid rgba(128, 128, 128, 0.28);
  border-radius: 14px;
  background: rgba(128, 128, 128, 0.06);
  position: relative;
  overflow: hidden;
}

.llm-diagram-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.llm-diagram-header h4 {
  margin: 0 0 0.5rem 0;
  color: inherit;
}

.llm-diagram-header p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Base Node Style */
.llm-node {
  background: rgba(70, 125, 200, 0.1);
  border: 2px solid rgba(70, 125, 200, 0.5);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.llm-node:hover, .llm-node.active {
  background: rgba(70, 125, 200, 0.2);
  border-color: rgba(70, 125, 200, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.llm-node-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.llm-node-subtitle {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Edges / Connections */
.llm-edge {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0.6;
  padding: 0.5rem;
}

.llm-edge.vertical {
  flex-direction: column;
}

/* Detail Panel */
.llm-detail-panel {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(80, 120, 180, 0.08);
  border-left: 4px solid rgba(70, 125, 200, 0.7);
  display: none;
  animation: fadeIn 0.3s ease-out forwards;
}

.llm-detail-panel.active {
  display: block;
}

.llm-detail-panel h5 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.llm-detail-panel p {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.llm-detail-panel ul {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.95rem;
}

/* Stack Layout (Post 201, 204, 209) */
.llm-stack-layout {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.llm-stack-layout .llm-node {
  padding: 0.75rem;
}

/* Split/Flow Layout (Post 202, 205, 208) */
.llm-flow-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Grid Layout (Post 203) */
.llm-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Circle Node (Post 206 Loop) */
.llm-loop-layout {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.llm-node-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Tree Layout (Post 207) */
.llm-tree-level {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseBorder {
  0% { box-shadow: 0 0 0 0 rgba(70, 125, 200, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(70, 125, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(70, 125, 200, 0); }
}

.llm-animating {
  animation: pulseBorder 1.5s infinite;
  border-color: rgba(70, 125, 200, 1);
}

/* Dark mode adjustments removed to inherit site theme smoothly */
