/* style.css */
body { background-color: #f8f9fa; font-family: 'Sarabun', sans-serif; }
.card { box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: none; }

/* Tree Structure Styles */
.tree-node { position: relative; margin-top: 8px; }
.tree-children { margin-left: 24px; border-left: 2px solid #e9ecef; padding-left: 12px; }
.tree-children:hover { border-left-color: #adb5bd; }

.node-content { background: #fff; border: 1px solid #dee2e6; border-radius: 6px; padding: 8px 12px; }
.node-content:hover { border-color: #0d6efd; box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1); }

.badge-type { font-size: 0.75rem; padding: 4px 8px; border-radius: 4px; margin-right: 8px; font-weight: bold; text-transform: uppercase; }
.node-title { font-weight: 600; color: #212529; }
.node-body { margin-top: 6px; font-size: 0.9rem; color: #555; white-space: pre-wrap; }

/* Color Coding */
.type-chapter { background: #cfe2ff; color: #084298; }
.type-key_concept { background: #fff3cd; color: #664d03; }
.type-action_item { background: #d1e7dd; color: #0f5132; }
.type-anti_pattern { background: #f8d7da; color: #842029; }
.type-example { background: #e2e3e5; color: #41464b; }
.type-quote { font-style: italic; color: #6c757d; border-left: 3px solid #dee2e6; padding-left: 8px; }

/* Hidden Actions */
.node-actions { visibility: hidden; opacity: 0; transition: 0.2s; float: right; }
.node-content:hover .node-actions { visibility: visible; opacity: 1; }

.type-analogy { 
    background-color: #e0cffc; /* สีม่วงพาสเทล */
    color: #59359a; 
    border: 1px solid #d0bfff;
}

.type-rationale { 
    background-color: #e6fffa; /* สีมิ้นท์อ่อนๆ */
    color: #0d9488; /* สีเขียวอมฟ้าเข้ม */
    border: 1px solid #99f6e4;
}