@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Akshar:wght@300..700&display=swap");
.section-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.section-tag { display: inline-block; margin-bottom: 12px; color: #8b5cf6; text-transform: uppercase; letter-spacing: 0.12em; font-family: "Akshar", sans-serif; font-size: 0.8rem; font-weight: 600; }

@media (max-width: 576px) { .section-container { padding: 0 16px; } }

#techtonica_calculator { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem; padding-top: 2rem; color: #e4e4ef; }

#techtonica_calculator section { margin-bottom: 1.5rem; }

.calculator-title { color: #e4e4ef; font-family: "Lora", serif; font-size: 1.8rem; font-weight: 600; margin-bottom: 1.5rem; text-align: center; }

.item-picker-section { background: rgba(22, 22, 42, 0.75); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(139, 92, 246, 0.12); border-radius: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05); padding: 1.25rem; }

@media (max-width: 768px) { .item-picker-section { border-radius: 20px; } }

@media (max-width: 576px) { .item-picker-section { border-radius: 16px; } }

.item-search-input { width: 100%; margin-bottom: 1rem; padding: 0.6rem 1rem; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(139, 92, 246, 0.15); border-radius: 10px; color: #e4e4ef; }

.item-search-input:focus { border-color: #8b5cf6; outline: none; }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; max-height: 320px; overflow-y: auto; }

.item-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; background: transparent; border: 1px solid transparent; border-radius: 10px; color: #9898b0; cursor: pointer; transition: background 0.15s, border-color 0.15s; }

.item-cell:hover { background: rgba(139, 92, 246, 0.1); }

.item-cell.selected { background: rgba(139, 92, 246, 0.2); border-color: #8b5cf6; color: #e4e4ef; }

.item-cell.filtered-out { display: none; }

.item-cell .item-icon { width: 40px; height: 40px; }

.item-icon-placeholder { display: inline-block; background: rgba(139, 92, 246, 0.08); border-radius: 6px; }

.item-cell-name { overflow: hidden; width: 100%; font-size: 0.62rem; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }

.controls-section { background: rgba(22, 22, 42, 0.75); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(139, 92, 246, 0.12); border-radius: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05); display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 1.25rem; }

@media (max-width: 768px) { .controls-section { border-radius: 20px; } }

@media (max-width: 576px) { .controls-section { border-radius: 16px; } }

.control-group { display: flex; flex-direction: column; gap: 0.4rem; }

.control-group label { color: #6b6b85; font-size: 0.85rem; }

.control-group input, .control-group select { padding: 0.5rem 0.75rem; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(139, 92, 246, 0.15); border-radius: 8px; color: #e4e4ef; }

.control-group input:focus, .control-group select:focus { border-color: #8b5cf6; outline: none; }

.control-group select option { background: #0f0f1a; }

.production-tree-container { overflow-x: auto; }

.tree-placeholder { background: rgba(22, 22, 42, 0.75); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(139, 92, 246, 0.12); border-radius: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05); padding: 2rem; color: #6b6b85; text-align: center; }

@media (max-width: 768px) { .tree-placeholder { border-radius: 20px; } }

@media (max-width: 576px) { .tree-placeholder { border-radius: 16px; } }

.production-tree, .production-node-children { list-style: none; margin: 0; padding: 0; }

.production-node-children { margin-left: 22px; padding-left: 18px; border-left: 2px solid rgba(139, 92, 246, 0.25); }

.production-node { margin-bottom: 8px; }

.production-node.collapsed > .production-node-children { display: none; }

.production-node.collapsed > .node-card .collapse-button::before { transform: rotate(-90deg); }

.node-card { background: rgba(22, 22, 42, 0.75); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(139, 92, 246, 0.12); border-radius: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05); border-radius: 14px; padding: 0.75rem 1rem; }

.node-header { display: flex; align-items: center; gap: 8px; margin-bottom: 0.4rem; }

.node-header .item-icon { width: 28px; height: 28px; }

.node-item-name { color: #e4e4ef; font-family: "Lora", serif; font-size: 1.05rem; font-weight: 600; }

.collapse-button { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: rgba(139, 92, 246, 0.15); border-radius: 6px; border: none; color: #e4e4ef; cursor: pointer; }

.collapse-button::before { content: ""; border-top: 6px solid currentColor; border-right: 5px solid transparent; border-left: 5px solid transparent; transition: transform 0.15s; }

.node-badge { padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; }

.node-badge.badge-raw-material { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }

.node-badge.badge-circular { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.node-badge.badge-sub-recipe { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.node-stats { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; font-size: 0.85rem; }

.node-stat-row { display: flex; align-items: center; gap: 6px; }

.node-stat-label { color: #6b6b85; font-size: 0.75rem; }

.rate-unknown { color: #f59e0b; }

.craft-detail { color: #c8c8d8; }

.recipe-select { padding: 0.2rem 0.5rem; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(139, 92, 246, 0.15); border-radius: 6px; color: #e4e4ef; }

.recipe-select option { background: #0f0f1a; }

.calculation-warning { background: rgba(22, 22, 42, 0.75); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(139, 92, 246, 0.12); border-radius: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05); margin-bottom: 1.5rem; padding: 1rem 1.25rem; border-color: rgba(245, 158, 11, 0.4); color: #f59e0b; font-size: 0.85rem; }

@media (max-width: 768px) { .calculation-warning { border-radius: 20px; } }

@media (max-width: 576px) { .calculation-warning { border-radius: 16px; } }

.calculation-warning p { margin: 0; }

.calculation-warning p + p { margin-top: 0.4rem; }

.totals-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.totals-section[hidden] { display: none; }

@media (max-width: 992px) { .totals-section { grid-template-columns: 1fr; } }

.totals-table-container { background: rgba(22, 22, 42, 0.75); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(139, 92, 246, 0.12); border-radius: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05); padding: 1rem 1.25rem; }

@media (max-width: 768px) { .totals-table-container { border-radius: 20px; } }

@media (max-width: 576px) { .totals-table-container { border-radius: 16px; } }

.totals-table-container h2 { color: #e4e4ef; font-family: "Lora", serif; font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }

.totals-empty { color: #6b6b85; }

.totals-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

.totals-table td { padding: 4px 6px; border-bottom: 1px solid rgba(139, 92, 246, 0.08); }

.totals-table td:last-child { text-align: right; white-space: nowrap; }

.totals-table .item-icon { width: 22px; height: 22px; margin-right: 6px; vertical-align: middle; }
