Elffuss BraidHub

utopia-ia/elffuss-code public

f0ffbf147271 · 41.3 KiBRawPermalink
1/* Elffuss Code — VS Code oscuro con alma élfica */
2:root {
3 --bg: #090a11; --bg2: #101317; --bg3: #161a24; --line: #20252c;
4 --fg: #eae8f2; --muted: #8b929c; --accent: #c8a06a; --accent2: #8272ff;
5 --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
6}
7* { box-sizing: border-box; }
8html, body { height: 100%; margin: 0; }
9body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--fg); overflow: hidden; }
10
11/* ---------- landing ---------- */
12#landing {
13 position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
14 background: radial-gradient(1100px 700px at 50% 30%, #221740, #0b0d12 72%); text-align: center;
15}
16#landing[hidden] { display: none; }
17#landing canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; }
18#landing .l-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; }
19#landing .hero { width: 170px; filter: drop-shadow(0 12px 40px rgba(124,92,255,.35)); animation: float 5s ease-in-out infinite; }
20@keyframes float { 50% { transform: translateY(-9px); } }
21#landing h1 { margin: 4px 0 0; font-size: 2rem; }
22#landing h1 b { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
23#landing .tag { color: var(--muted); margin: 0; line-height: 1.5; }
24#landing .tag b { color: var(--accent); }
25#open-project {
26 margin-top: 12px; padding: 14px 34px; font-size: 1.08rem; cursor: pointer; color: #fff;
27 border: none; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent2));
28 box-shadow: 0 8px 30px rgba(255,77,141,.35);
29}
30#open-project:hover { filter: brightness(1.12); }
31#landing .ghost, .ghost {
32 background: none; color: var(--muted); border: 1px solid var(--line);
33 border-radius: 8px; padding: 8px 14px; cursor: pointer;
34}
35#landing .mini { font-size: .75rem; color: #5a6480; }
36.resume-clone { display: flex; align-items: center; gap: 8px; margin-top: 8px; background: rgba(124,92,255,.12); border: 1px solid var(--accent2); border-radius: 999px; padding: 7px 8px 7px 16px; font-size: .78rem; color: var(--fg); }
37#resume-clone-btn { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .76rem; cursor: pointer; }
38.clone-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
39.clone-or { font-size: .72rem; color: #5a6480; }
40#clone-url { width: 300px; max-width: 60vw; background: var(--bg3); border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 9px 16px; font-size: .82rem; }
41#clone-url:focus { outline: none; border-color: var(--accent2); }
42#clone-btn { background: none; color: var(--fg); border: 1px solid var(--accent2); border-radius: 999px; padding: 9px 16px; font-size: .82rem; cursor: pointer; white-space: nowrap; }
43#clone-btn:hover { background: rgba(124,92,255,.15); }
44#clone-btn:disabled { opacity: .5; cursor: default; }
45.clone-status { min-height: 1.1em; }
46.clone-status.err { color: #ff6b8b; }
47@media (max-width: 560px) { .clone-row { flex-direction: column; } #clone-url { width: 78vw; } }
48
49/* ---------- IDE ---------- */
50#ide { display: flex; flex-direction: column; height: 100vh; }
51#ide[hidden] { display: none; } /* el display:flex le ganaba a [hidden] → el IDE asomaba tras la landing */
52header {
53 display: flex; justify-content: space-between; align-items: center;
54 padding: 6px 12px; background: var(--bg2); border-bottom: 1px solid var(--line);
55}
56.brand { display: flex; align-items: center; gap: 8px; }
57.brand img { width: 26px; height: 26px; }
58.proj { color: var(--muted); font-size: .85rem; }
59.controls { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
60select { background: var(--bg3); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
61.dot { width: 9px; height: 9px; border-radius: 50%; }
62.dot.off { background: #4a5062; } .dot.on { background: #3fb970; }
63.dot.loading { background: #e5a53a; animation: pulse 1.2s infinite; }
64@keyframes pulse { 50% { opacity: .35; } }
65
66#settings-panel { display: flex; gap: 10px; padding: 10px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); overflow-x: auto; position: relative; }
67#settings-panel[hidden] { display: none; } /* ¡el display:flex le ganaba a hidden! */
68#settings-close { position: absolute; top: 6px; right: 10px; background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
69#settings-close:hover { color: var(--accent); }
70#settings-panel .card { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; min-width: 200px; }
71#settings-panel input[type=text], #settings-panel input:not([type]) , #settings-panel input[type=password] { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: .78rem; }
72
73main { flex: 1; display: grid; grid-template-columns: 46px 235px minmax(0, 1fr) minmax(440px, 34%); grid-template-rows: minmax(0, 1fr); min-height: 0; overflow: hidden; }
74body.hide-tree main { grid-template-columns: 46px 0 minmax(0, 1fr) minmax(440px, 34%); }
75body.hide-tree #sidebar { display: none; }
76
77/* barra de actividad estilo VS Code */
78#activity {
79 display: flex; flex-direction: column; align-items: center; gap: 4px;
80 background: #0d0f15; border-right: 1px solid var(--line); padding: 8px 0;
81}
82#activity button {
83 width: 44px; height: 42px; background: none; border: none; cursor: pointer;
84 color: #6b7391; display: flex; align-items: center; justify-content: center;
85 border-left: 2px solid transparent;
86}
87#activity button:hover { color: var(--fg); }
88#activity button.on { color: var(--fg); border-left-color: var(--accent); }
89#activity img { width: 26px; height: 26px; margin-top: auto; margin-bottom: 6px; opacity: .85; }
90
91/* explorador */
92#sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--bg2); border-right: 1px solid var(--line); }
93#explorer-head {
94 padding: 8px 12px 6px; font-size: .68rem; letter-spacing: .08em; color: var(--muted);
95 display: flex; gap: 8px; align-items: baseline;
96}
97#explorer-head span { color: var(--fg); font-weight: 700; }
98#tree { flex: 1; overflow: auto; padding: 0 4px 8px; font-size: .82rem; }
99#tree ul { list-style: none; margin: 0; padding-left: 10px; border-left: 1px solid #1d2230; }
100#tree > ul { border-left: none; padding-left: 4px; }
101#tree summary { cursor: pointer; color: #c8cede; padding: 2px 0; display: flex; align-items: center; gap: 4px; user-select: none; }
102#tree summary::-webkit-details-marker, #tree summary::marker { display: none; content: ''; }
103#tree details[open] > summary .chevron { transform: rotate(90deg); transform-origin: 8px 8px; }
104#tree .chevron { transition: transform .12s; }
105#tree summary:hover, #tree .file:hover { color: #fff; background: #ffffff0a; border-radius: 4px; }
106#tree .file { cursor: pointer; display: flex; align-items: center; gap: 5px; padding: 2px 0 2px 16px; color: #b8c0d4; }
107.fico { flex: 0 0 auto; vertical-align: -3px; }
108
109#editor-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
110#tabs-bar { display: flex; background: #0d0f15; border-bottom: 1px solid var(--line); overflow-x: auto; min-height: 34px; }
111.tab { display: flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: .8rem; color: var(--muted); border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; }
112.tab.active { background: var(--bg); color: var(--fg); box-shadow: inset 0 2px 0 var(--accent); }
113.tab.tab-preview .tab-name { font-style: italic; }
114.tab .tab-ico { display: flex; }
115.tab b { cursor: pointer; opacity: .55; width: 14px; text-align: center; }
116.tab b:hover { opacity: 1; color: var(--accent); }
117.tab b.dirty { opacity: 1; color: var(--fg); }
118.tab b.dirty:hover::before { content: ''; }
119#editor { flex: 1; min-height: 0; }
120#editor-empty { position: absolute; inset: 34px 0 22px 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); color: var(--muted); z-index: 2; text-align: center; }
121#editor-empty img { width: 84px; opacity: .5; }
122#editor-empty p { font-size: .9rem; line-height: 1.5; }
123
124/* la elfa de la barra: animada cuando el cerebro trabaja (invita a hacer clic) */
125#activity img { transition: transform .2s; cursor: pointer; }
126#activity img:hover { transform: scale(1.12); }
127#activity img.working { animation: elfWorking 1.5s ease-in-out infinite; }
128@keyframes elfWorking {
129 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(124,92,255,.5)); }
130 50% { transform: scale(1.14); filter: drop-shadow(0 0 12px rgba(255,77,141,.95)); }
131}
132
133/* ── Mente de Elffuss (cerebro CEO · mundo trance) ─────────────────────── */
134#mind-overlay { position: fixed; inset: 0; z-index: 300; background: radial-gradient(1200px 800px at 50% 45%, #1a0a2e, #05030c 78%); overflow: hidden; }
135#mind-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
136#mind-title { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); text-align: center; font-size: 1.1rem; font-weight: 800; letter-spacing: .18em; color: #fff; text-shadow: 0 0 22px #ff4d8d; pointer-events: none; }
137#mind-title span { display: block; font-size: .66rem; font-weight: 500; letter-spacing: .06em; color: #b9a7ff; margin-top: 4px; text-shadow: none; }
138#mind-close { position: absolute; top: 14px; right: 16px; z-index: 6; background: rgba(255,77,141,.14); border: 1px solid #ff4d8d; color: #ffd7e6; border-radius: 999px; padding: 7px 14px; font-size: .8rem; cursor: pointer; backdrop-filter: blur(6px); }
139#mind-close:hover { background: rgba(255,77,141,.28); }
140#mind-history { position: absolute; top: 14px; right: 182px; z-index: 6; background: rgba(73,232,221,.14); border: 1px solid #49e8ff; color: #bfeef6; border-radius: 999px; padding: 7px 12px; font-size: .78rem; cursor: pointer; backdrop-filter: blur(6px); }
141#mind-history:hover { background: rgba(73,232,221,.28); }
142#mind-playstop { position: absolute; top: 14px; right: 278px; z-index: 6; background: rgba(63,185,112,.16); border: 1px solid #3fb970; color: #b7f2cf; border-radius: 999px; padding: 7px 12px; font-size: .78rem; cursor: pointer; backdrop-filter: blur(6px); }
143#mind-playstop:hover { background: rgba(63,185,112,.3); }
144#mind-playstop.paused { background: rgba(255,180,70,.16); border-color: #ffb446; color: #ffe0b0; }
145#mind-playstop.paused:hover { background: rgba(255,180,70,.3); }
146#mind-config { position: absolute; top: 14px; right: 96px; z-index: 6; background: rgba(124,92,255,.16); border: 1px solid #7c5cff; color: #d8ccff; border-radius: 999px; padding: 7px 12px; font-size: .78rem; cursor: pointer; backdrop-filter: blur(6px); }
147#mind-config:hover { background: rgba(124,92,255,.3); }
148/* leyenda de perfiles: fija, no flota (siempre legible) */
149#mind-legend { position: absolute; top: 60px; left: 14px; z-index: 5; display: flex; flex-direction: column; gap: 5px; background: rgba(8,5,18,.5); border: 1px solid rgba(124,92,255,.3); border-radius: 10px; padding: 8px 12px; backdrop-filter: blur(6px); pointer-events: auto; }
150.ml-item { font-size: .68rem; color: #cfe8f0; display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 2px 4px; border-radius: 5px; }
151.ml-item:hover { background: rgba(255,255,255,.08); }
152.ml-sw { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 6px currentColor; flex: none; }
153/* solo etiquetas de propuestas forjadas flotan ancladas al mundo */
154#mind-anchors { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
155.mind-node-label { position: absolute; font-size: .6rem; color: #ffd7e6; background: rgba(255,77,141,.18); border: 1px solid rgba(255,77,141,.5); border-radius: 6px; padding: 1px 6px; pointer-events: none; white-space: nowrap; text-shadow: 0 0 8px #ff4d8d; }
156/* historial completo: TODO lo que ha llegado, sin recortar */
157#mind-log { position: absolute; top: 0; right: -380px; width: 360px; height: 100%; z-index: 8; display: flex; flex-direction: column; background: rgba(6,4,14,.92); border-left: 1px solid rgba(73,232,221,.35); backdrop-filter: blur(10px); transition: right .25s ease; }
158#mind-log.show { right: 0; }
159.ml-head { display: flex; align-items: center; padding: 12px 14px; font-size: .82rem; font-weight: 700; color: #bfeef6; border-bottom: 1px solid rgba(73,232,221,.25); }
160.ml-head button { margin-left: auto; background: none; border: none; color: #7fd9d0; cursor: pointer; font-size: .9rem; }
161#mind-log-body { flex: 1; overflow-y: auto; padding: 8px 10px; }
162.ml-row { font-size: .68rem; line-height: 1.6; padding: 3px 4px; border-radius: 5px; display: flex; gap: 6px; align-items: baseline; }
163.ml-row:hover { background: rgba(255,255,255,.04); }
164.ml-row .ml-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
165.ml-row .ml-t { color: #dfeef2; word-break: break-word; }
166/* panel flotante con el .md del pensamiento (clic en un nodo) */
167#mind-panel { position: absolute; top: 70px; right: 16px; width: min(420px, 40vw); max-height: 70vh; z-index: 6; display: none; flex-direction: column; background: rgba(8,5,18,.9); border: 1px solid #7c5cff; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 50px rgba(0,0,0,.6); }
168#mind-panel.show { display: flex; }
169#mind-panel .mp-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: .74rem; color: #d8ccff; background: rgba(124,92,255,.14); border-bottom: 1px solid rgba(124,92,255,.3); }
170#mind-panel .mp-head button { margin-left: auto; background: none; border: none; color: #b9a7ff; cursor: pointer; font-size: .9rem; }
171#mind-panel .mp-body { flex: 1; overflow: auto; margin: 0; padding: 12px; font-size: .78rem; line-height: 1.55; color: #cfe8f0; }
172#mind-panel .mp-body h1, #mind-panel .mp-body h2, #mind-panel .mp-body h3 { color: #fff; margin: 12px 0 6px; }
173#mind-panel .mp-body code { background: rgba(124,92,255,.18); padding: 1px 5px; border-radius: 4px; font-size: .82em; }
174#mind-panel .mp-body pre { background: #0b0716; border: 1px solid rgba(124,92,255,.3); border-radius: 8px; padding: 8px; overflow-x: auto; }
175#mind-panel .mp-body ul, #mind-panel .mp-body ol { padding-left: 1.2em; }
176.mp-actions { display: flex; gap: 8px; padding: 0 12px 12px; }
177.mp-exec { flex: 1; background: linear-gradient(135deg, #ff4d8d, #7c5cff); border: none; color: #fff; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .78rem; font-weight: 600; }
178.mp-open { flex: 1; background: rgba(124,92,255,.15); border: 1px solid #7c5cff; color: #d8ccff; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .78rem; }
179/* panel de configuración del cerebro */
180#mind-cfg { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: min(520px, 92vw); z-index: 7; display: none; flex-direction: column; gap: 6px; background: rgba(8,5,18,.94); border: 1px solid #7c5cff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 16px 60px rgba(0,0,0,.6); }
181#mind-cfg.show { display: flex; }
182.cfg-head { display: flex; align-items: center; font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
183.cfg-head button { margin-left: auto; background: none; border: none; color: #b9a7ff; cursor: pointer; }
184.cfg-notif { font-size: .68rem; color: #9fb; background: rgba(63,185,112,.1); border: 1px solid rgba(63,185,112,.3); border-radius: 8px; padding: 6px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
185.bridge-card #br-token, .bridge-card #br-folder { background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 6px 9px; font-size: .78rem; width: 100%; }
186.bridge-card details { color: var(--muted); }
187.bridge-card details summary::marker { color: var(--accent2); }
188#fireworks-fx { position: fixed; inset: 0; z-index: 999; pointer-events: none; }
189.cfg-notif-btn { background: #3fb970; border: none; color: #06180d; border-radius: 6px; padding: 3px 10px; font-size: .68rem; font-weight: 700; cursor: pointer; }
190#mind-cfg label { font-size: .68rem; color: #b9a7ff; margin-top: 4px; }
191#mind-cfg textarea, #mind-cfg input:not([type=color]) { background: #0b0716; border: 1px solid rgba(124,92,255,.4); color: #e8ebf4; border-radius: 8px; padding: 8px 10px; font-size: .78rem; font-family: inherit; resize: vertical; }
192#cfg-profiles { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
193.cfg-prof { display: grid; grid-template-columns: 30px 1fr 1.4fr 26px; gap: 6px; align-items: center; }
194.cfg-prof input[type=color] { width: 30px; height: 30px; padding: 0; border: 1px solid rgba(124,92,255,.4); border-radius: 6px; background: none; cursor: pointer; }
195.cfg-prof input[type=text] { background: #0b0716; border: 1px solid rgba(124,92,255,.4); color: #e8ebf4; border-radius: 6px; padding: 6px 8px; font-size: .72rem; }
196.cp-del { background: none; border: none; color: #ff8fb0; cursor: pointer; font-size: .8rem; }
197.cfg-add { align-self: flex-start; background: rgba(124,92,255,.15); border: 1px dashed rgba(124,92,255,.5); color: #d8ccff; border-radius: 8px; padding: 6px 12px; font-size: .74rem; cursor: pointer; margin-top: 4px; }
198.cfg-actions { display: flex; gap: 8px; margin-top: 8px; }
199.cfg-ghost { flex: 1; background: rgba(73,232,221,.14); border: 1px solid #49e8ff; color: #bfeef6; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .78rem; }
200.cfg-save { flex: 1; margin-top: 0; background: linear-gradient(135deg, #ff4d8d, #7c5cff); border: none; color: #fff; border-radius: 8px; padding: 9px; cursor: pointer; font-size: .8rem; font-weight: 600; }
201.cfg-note { font-size: .64rem; color: #8a7bb8; margin-top: 4px; }
202.mind-music { position: absolute; bottom: 14px; right: 14px; z-index: 5; width: 300px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,77,141,.4); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
203.mind-music-cap { font-size: .62rem; color: #ffd7e6; background: rgba(10,6,24,.8); padding: 4px 8px; text-align: center; }
204@media (max-width: 820px) { #mind-log { width: 88vw; right: -90vw; } .mind-music { width: 180px; } }
205
206/* menú contextual del árbol y de las pestañas (botón derecho) */
207#tree-menu, #tab-menu { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 4px; min-width: 168px; box-shadow: 0 10px 34px rgba(0,0,0,.5); display: flex; flex-direction: column; }
208.tm-item { text-align: left; background: none; border: none; color: var(--fg); font-size: .82rem; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
209.tm-item:hover { background: var(--bg3); }
210.tm-item.danger { color: #ff6b8b; }
211.tm-item.danger:hover { background: #3a1420; }
212.tm-sep { height: 1px; background: var(--line); margin: 4px 2px; }
213
214/* vista previa de markdown (pestaña en modo Vista previa, en vez del código fuente) */
215#md-preview-pane { position: absolute; inset: 34px 0 22px 0; overflow-y: auto; background: var(--bg); padding: 18px 26px; z-index: 2; }
216#md-preview-pane h1, #md-preview-pane h2, #md-preview-pane h3 { color: #fff; margin: 18px 0 8px; }
217#md-preview-pane code { background: var(--bg3); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
218#md-preview-pane pre { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; }
219#md-preview-pane a { color: var(--accent2); }
220#md-preview-pane.html-preview { padding: 0; overflow: hidden; }
221#md-preview-pane.html-preview iframe { display: block; width: 100%; height: 100%; border: none; background: #fff; }
222
223/* panel del terminal (abajo del editor, estilo VS Code) */
224#terminal-panel { display: flex; flex-direction: column; height: 260px; flex: 0 0 auto; background: #0b0d12; border-top: 1px solid var(--line); position: relative; }
225#terminal-panel[hidden] { display: none; }
226#term-resize { position: absolute; top: -3px; left: 0; right: 0; height: 6px; cursor: ns-resize; z-index: 3; }
227#term-resize:hover { background: var(--accent2); opacity: .4; }
228#term-head { display: flex; align-items: center; gap: 10px; padding: 3px 10px; background: #0d0f15; border-bottom: 1px solid var(--line); }
229#term-head .term-title { font-size: .68rem; letter-spacing: .08em; color: var(--fg); font-weight: 700; }
230#term-caps { font-size: .68rem; color: var(--muted); flex: 1; }
231.term-btn { background: none; border: none; color: var(--muted); font-size: .72rem; cursor: pointer; padding: 2px 6px; border-radius: 5px; }
232.term-btn:hover { color: var(--fg); background: var(--bg3); }
233#terminal-host { flex: 1; min-height: 0; padding: 4px 6px; overflow: hidden; }
234#terminal-host .xterm { height: 100%; }
235
236#statusbar {
237 padding: 3px 12px; font-size: .74rem; color: #fff; min-height: 22px;
238 background: linear-gradient(90deg, #3d2a68, #4c2050);
239 border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
240}
241
242/* carga del modelo: visible desde el primer segundo, sobre landing e IDE */
243#model-progress {
244 position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
245 z-index: 120; display: flex; align-items: center; gap: 10px;
246 width: min(440px, 92vw); padding: 10px 14px;
247 background: var(--bg3); border: 1px solid var(--accent2); border-radius: 14px;
248 box-shadow: 0 10px 40px rgba(124, 92, 255, .35);
249}
250#model-progress[hidden] { display: none; }
251#model-progress img { width: 34px; height: 34px; }
252#model-progress .mp-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }
253#model-progress span { font-size: .82rem; color: var(--fg); }
254#model-progress .track { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
255#model-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .25s; }
256
257/* ---------- chat ---------- */
258#chat { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg2); min-height: 0; }
259#chat-log { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
260
261/* pestañas de conversación (varias en paralelo — cerrar NO borra, solo quita de la vista) */
262#conv-tabs { display: flex; flex: 0 0 auto; background: #0d0f15; border-bottom: 1px solid var(--line); overflow-x: auto; min-height: 34px; align-items: center; }
263#conv-tabs .tab-add { flex: 0 0 auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px 12px; align-self: stretch; }
264#conv-tabs .tab-add:hover { color: var(--fg); background: var(--bg3); }
265.tab.tab-busy .tab-name::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; animation: tab-busy-pulse 1s ease-in-out infinite; }
266@keyframes tab-busy-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
267
268/* panel de historial de conversaciones (todas las guardadas, no solo abiertas) */
269#history-panel { position: fixed; top: 46px; right: 12px; width: 320px; max-height: 60vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.5); z-index: 90; display: flex; flex-direction: column; }
270#history-panel[hidden] { display: none; }
271.hp-head { display: flex; align-items: center; padding: 10px 12px; font-size: .85rem; font-weight: 700; color: var(--fg); border-bottom: 1px solid var(--line); }
272.hp-head button { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: .9rem; }
273#hp-list { overflow-y: auto; padding: 4px; }
274.hp-empty { padding: 16px; color: var(--muted); font-size: .8rem; text-align: center; }
275.hp-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
276.hp-row:hover { background: var(--bg3); }
277.hp-title { font-size: .82rem; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
278.hp-date { font-size: .68rem; color: var(--muted); white-space: nowrap; }
279.hp-del { background: none; border: none; cursor: pointer; font-size: .8rem; opacity: .6; }
280.hp-del:hover { opacity: 1; }
281.msg { padding: 8px 11px; border-radius: 11px; font-size: .85rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-width: 95%; }
282.msg.sys { background: linear-gradient(135deg, #1c1430, #14202e); border: 1px solid var(--line); }
283.msg.user { background: var(--accent2); color: #fff; align-self: flex-end; }
284.msg.assistant { background: var(--bg3); border: 1px solid var(--line); align-self: flex-start; }
285.msg.err { border-color: #a03050; }
286/* herramientas estilo plugin de Claude Code: ● nombre + args + resultado plegable */
287.msg.tool { display: flex; align-items: center; gap: 7px; background: none; padding: 2px 6px; font-size: .8rem; }
288.msg.tool .tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
289.msg.tool b { color: var(--fg); font-weight: 600; font-family: ui-monospace, monospace; font-size: .76rem; }
290.msg.tool .targ { color: var(--muted); font-family: ui-monospace, monospace; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
291.msg.tool-result { color: var(--muted); font-size: .74rem; background: none; padding: 0 6px 0 19px; }
292.msg.tool-result summary { cursor: pointer; list-style: none; }
293.msg.tool-result summary::before { content: '⎿ '; color: #4a5266; }
294.msg.tool-result pre { margin: 4px 0 0; background: #0d1117; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; font-size: .72rem; }
295.msg.tool-result.err summary { color: #e5a53a; }
296.msg.user.queued { opacity: .55; }
297.msg.user.queued::after { content: ' ⏳'; }
298.msg.thinking { background: var(--bg3); border: 1px dashed var(--line); color: var(--muted); font-size: .8rem; }
299.msg.thinking .gen { font-family: ui-monospace, monospace; font-size: .7rem; color: #5f6880; max-height: 168px; overflow-y: auto; white-space: pre-wrap; }
300.msg.thinking .gen.tool-preview { font-family: inherit; font-size: .78rem; color: var(--accent2); font-style: italic; }
301
302/* 🎯 Modo Objetivo: botón + tarjeta de plan (planificador/ejecutor) */
303.cbtn.goal { font-size: .74rem; }
304.cbtn.goal.on { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #3a2050, #2a1840); }
305.cbtn.hardwork { font-size: .74rem; }
306.cbtn.hardwork.on { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #3a2a18, #2a1f40); box-shadow: 0 0 0 1px var(--accent) inset; }
307.msg.plan-card { background: var(--bg3); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: .82rem; align-self: stretch; max-width: 100%; }
308.plan-card .plan-head { font-weight: 600; margin-bottom: 2px; }
309.plan-card .plan-summary { color: var(--muted); font-size: .78rem; margin-bottom: 8px; }
310.plan-card .plan-status { float: right; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
311.plan-card ul.plan-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
312.plan-card ul.plan-tasks li { display: flex; align-items: baseline; gap: 7px; padding: 5px 7px; border-radius: 7px; background: var(--bg2); border: 1px solid var(--line); }
313.plan-card .task-ico { flex: 0 0 auto; }
314.plan-card .task-title { font-weight: 600; }
315.plan-card .task-desc { color: var(--muted); font-size: .76rem; }
316.plan-card li.task-in-progress { border-color: var(--accent2); }
317.plan-card li.task-done .task-title { color: #7ee787; }
318.plan-card li.task-failed { border-color: #a03050; }
319.plan-card li.task-failed .task-title { color: #e5a53a; }
320.plan-card li.task-skipped { opacity: .5; }
321.plan-card li.task-skipped .task-title { text-decoration: line-through; }
322#composer { display: flex; gap: 6px; padding: 10px; }
323#prompt { flex: 1; background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; color: var(--fg); padding: 9px 11px; outline: none; }
324#prompt:focus { border-color: var(--accent2); }
325#composer button { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; border-radius: 9px; color: #fff; padding: 0 14px; cursor: pointer; }
326
327/* ---------- markdown en el chat (estilo plugin de Claude Code) ---------- */
328.msg.md { white-space: normal; }
329.proposal-exec-btn { display: block; margin-top: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 8px; padding: 8px 14px; font-size: .78rem; font-weight: 600; cursor: pointer; }
330.proposal-exec-btn:hover { filter: brightness(1.1); }
331.proposal-exec-btn:disabled { opacity: .6; cursor: default; filter: none; }
332.msg.md code {
333 background: #0d1117; border: 1px solid var(--line); border-radius: 5px;
334 padding: 1px 6px; font-family: ui-monospace, monospace; font-size: .8em; color: #ffb3c9;
335}
336.msg.md code.file-link { cursor: pointer; color: var(--accent2); border-color: var(--accent2); text-decoration: underline dotted; }
337.msg.md code.file-link:hover { background: rgba(124,92,255,.18); }
338.msg.md pre.codeblock {
339 position: relative; background: #0d1117; border: 1px solid var(--line);
340 border-radius: 8px; padding: 10px 12px; margin: 8px 0; overflow-x: auto;
341}
342.msg.md pre.codeblock code {
343 background: none; border: none; padding: 0; color: #c9d1d9;
344 font-size: .78rem; line-height: 1.5; white-space: pre;
345}
346.msg.md pre.codeblock .lang {
347 position: absolute; top: 4px; right: 8px; font-size: .64rem;
348 color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
349}
350.msg.md h4 { margin: 10px 0 4px; font-size: .92rem; color: var(--fg); }
351.msg.md ul { margin: 4px 0; padding-left: 18px; }
352.msg.md li { margin: 2px 0; }
353.msg.md b { color: #fff; }
354
355/* botón flotante chat↔editor: solo en móvil */
356#code-flip {
357 display: none; position: fixed; bottom: 78px; right: 14px; z-index: 60;
358 padding: 10px 16px; font-size: .9rem; color: #fff; border: none;
359 border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent2));
360 box-shadow: 0 8px 24px rgba(0, 0, 0, .5); cursor: pointer;
361}
362
363/* ---------- móvil: cabecera fija + chat/editor conmutables ---------- */
364@media (max-width: 760px) {
365 main { grid-template-columns: 1fr; }
366 #activity, #sidebar { display: none; }
367 #code-flip { display: block; }
368 #editor-wrap { display: none; }
369 body.show-editor #editor-wrap { display: flex; }
370 body.show-editor #chat { display: none; }
371 #chat { border-left: none; min-width: 0; }
372 header { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
373 .proj { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
374 select { max-width: 38vw; font-size: .78rem; }
375 #prompt { font-size: 16px; } /* sin auto-zoom iOS */
376 #settings-panel { flex-direction: column; }
377 /* nada puede tapar el composer: píldora y botón flotante, por encima de él */
378 #model-progress { bottom: 132px; }
379 #code-flip { bottom: 76px; }
380}
381
382/* ---------- composer estilo plugin de Claude Code ---------- */
383#composer-wrap { border-top: 1px solid var(--line); background: var(--bg2); }
384#ctx-meter { display: flex; align-items: center; gap: 8px; padding: 5px 12px 0; font-size: .68rem; color: var(--muted); }
385#ctx-meter .ctx-track { flex: 1; height: 3px; background: var(--bg); border-radius: 2px; overflow: hidden; }
386#ctx-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .3s; }
387#ctx-bar.hot { background: linear-gradient(90deg, #e5a53a, #e5533a); }
388#composer { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; }
389.cbtn {
390 flex: 0 0 auto; background: var(--bg3); border: 1px solid var(--line); color: var(--muted);
391 border-radius: 8px; min-width: 30px; height: 32px; padding: 0 8px; cursor: pointer;
392 font-size: .95rem; display: inline-flex; align-items: center; gap: 4px;
393}
394.cbtn:hover { color: var(--fg); border-color: var(--accent2); }
395.cbtn.autoedit { font-size: .74rem; }
396.cbtn.autoedit .ae-ico { font-family: ui-monospace, monospace; }
397.cbtn.autoedit.on { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #3a2050, #2a1840); }
398#btn-send { position: relative; flex: 0 0 auto; background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; border-radius: 8px; color: #fff; height: 32px; padding: 0 14px; cursor: pointer; }
399/* mientras se procesa: la elfa está "pensando" — feedback claro en el propio botón */
400#btn-send.sending { cursor: not-allowed; }
401#btn-send.sending svg { opacity: .25; }
402#btn-send.sending::after {
403 content: ''; position: absolute; inset: 9px; border: 2px solid rgba(255,255,255,.35);
404 border-top-color: #fff; border-radius: 50%; animation: btn-send-spin .7s linear infinite;
405}
406@keyframes btn-send-spin { to { transform: rotate(360deg); } }
407
408/* Botón en modo PARAR (mientras el agente genera): clicable, no un spinner muerto */
409#btn-send.is-stop { background: linear-gradient(135deg, #e5484d, #c0353a); cursor: pointer; }
410#btn-send.is-stop svg { opacity: 1; }
411#btn-send.is-stop::after { display: none; } /* fuera el spinner de bloqueo */
412
413#composer #prompt { flex: 1; min-width: 0; }
414
415/* menú flotante de +/ */
416#menu {
417 position: absolute; bottom: 96px; left: 10px; right: 10px; z-index: 40;
418 background: var(--bg3); border: 1px solid var(--accent2); border-radius: 10px;
419 box-shadow: 0 -8px 30px rgba(0,0,0,.5); max-height: 320px; overflow-y: auto; padding: 4px;
420}
421#menu[hidden] { display: none; }
422#menu .sep { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 3px; }
423#menu .menu-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: .82rem; }
424#menu .menu-item:hover { background: #ffffff0f; }
425#menu .menu-item b { font-family: ui-monospace, monospace; font-weight: 600; }
426#menu .menu-item span { color: var(--muted); font-size: .74rem; }
427#chat { position: relative; }
428
429/* panel de skills */
430.skills-panel h3 { margin: 0 0 4px; font-size: 1rem; }
431.sk-h { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 6px; }
432.sk-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: .82rem; }
433.sk-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
434.sk-row .muted { color: var(--muted); font-size: .74rem; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
435.sk-row a { color: var(--accent2); font-size: .74rem; text-decoration: none; }
436.sk-row input { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 6px 9px; font-size: .78rem; }
437.sk-row button.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 6px; padding: 5px 11px; cursor: pointer; font-size: .76rem; }
438.sk-row button.ghost { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 5px 9px; cursor: pointer; font-size: .76rem; }
439#settings-panel { max-height: 55vh; overflow-y: auto; flex-direction: column; }
440
441/* el panel de ajustes/skills se SUPERPONE (no empuja el IDE) */
442#settings-panel { position: fixed; top: 46px; left: 46px; right: 0; z-index: 90; max-height: 78vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
443@media (max-width: 760px) { #settings-panel { left: 0; } }
444
445/* barra indeterminada (descargas sin loaded/total, p. ej. Gemma vía LiteRT-LM) */
446#model-progress .track { overflow: hidden; }
447#model-bar.indet { width: 35%; animation: indet 1.1s ease-in-out infinite; }
448@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
449
450/* ===== chrome estilo VS Code: menubar + palette + settings + git ===== */
451header { position: relative; }
452#model-select[hidden] { display: none; }
453.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; padding: 0; }
454.icon-btn svg { width: 16px; height: 16px; }
455.icon-inline svg { vertical-align: -3px; }
456
457/* barra de menú File/Edit/View/Git en la MISMA línea */
458#menubar { display: flex; gap: 1px; margin-left: 6px; }
459#menubar button { background: none; border: none; color: var(--muted); padding: 4px 9px; font-size: .8rem; cursor: pointer; border-radius: 5px; }
460#menubar button:hover, #menubar button.open { color: var(--fg); background: #ffffff10; }
461@media (max-width: 900px) { #menubar { display: none; } }
462
463/* dropdown del menú (fixed, anclado al botón) */
464#topmenu { position: fixed; z-index: 110; min-width: 220px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 34px rgba(0,0,0,.55); padding: 4px; }
465#topmenu[hidden] { display: none; }
466#topmenu .menu-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .82rem; }
467#topmenu .menu-item:hover { background: #ffffff10; }
468#topmenu .menu-item span { color: var(--muted); font-size: .74rem; }
469
470/* chip de rama git */
471.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg3); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: .74rem; cursor: pointer; }
472.chip[hidden] { display: none; }
473.chip:hover { color: var(--fg); border-color: var(--accent2); }
474.chip svg { width: 12px; height: 12px; }
475
476/* command palette */
477#palette { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 130; width: min(640px, 92vw); background: var(--bg3); border: 1px solid var(--accent2); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); overflow: hidden; }
478#palette[hidden] { display: none; }
479#pal-input { width: 100%; background: var(--bg); border: none; border-bottom: 1px solid var(--line); color: var(--fg); padding: 12px 14px; font-size: .92rem; outline: none; }
480#pal-list { max-height: 50vh; overflow-y: auto; padding: 4px; }
481.pal-item { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .84rem; }
482.pal-item.sel, .pal-item:hover { background: #7c5cff33; }
483.pal-item .pi-name { font-weight: 500; }
484.pal-item .pi-hint { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
485.pal-empty { padding: 12px 14px; color: var(--muted); font-size: .82rem; }
486
487/* settings: título, cierre y tarjetas de modelo/proveedor */
488.panel-title { margin: 2px 0 8px; font-size: 1rem; }
489.panel-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }
490.panel-close:hover { color: var(--accent); }
491.panel-close svg { width: 16px; height: 16px; }
492.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 6px; }
493.model-card { text-align: left; background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--fg); }
494.model-card:hover { border-color: var(--accent2); }
495.model-card.active { border-color: var(--accent); background: linear-gradient(135deg, #2a1840, #1a1428); }
496.model-card b { font-size: .84rem; color: var(--fg); }
497.model-card.active b { color: #fff; }
498.model-card span { color: #aab2c8; font-size: .72rem; }
499.prov-card { background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin-bottom: 7px; }
500.prov-card.on { border-color: var(--accent2); }
501.prov-head { display: flex; align-items: center; gap: 8px; }
502.prov-head b { flex: 1; font-size: .84rem; }
503.prov-use { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #fff; border-radius: 6px; padding: 4px 10px; font-size: .74rem; cursor: pointer; }
504.prov-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
505.prov-fields.hide { display: none; }
506.prov-fields input { background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 6px 9px; font-size: .78rem; width: 100%; }
507.field { display: flex; flex-direction: column; gap: 3px; }
508.field .muted { font-size: .7rem; }
509button.wide { width: 100%; padding: 9px; border-radius: 8px; }
510
511.model-card.disabled { opacity: .5; cursor: not-allowed; }
512.model-card.disabled:hover { border-color: var(--line); }
513
514/* ---------- vistas Arquitectura / Ciudad 3D (overlay sobre el editor) ---------- */
515#view-overlay { position: absolute; inset: 34px 0 22px 0; z-index: 30; background: #0b0d12; overflow: hidden; }
516#view-overlay[hidden] { display: none; }
517#editor-wrap { position: relative; }
518#view-close { position: absolute; top: 10px; right: 12px; z-index: 32; background: var(--bg3); border: 1px solid var(--line); color: var(--muted); width: 30px; height: 28px; border-radius: 7px; cursor: pointer; }
519#view-close:hover { color: var(--accent); }
520#view-body { width: 100%; height: 100%; position: relative; }
521#view-body svg#arch-svg { width: 100%; height: 100%; display: block; cursor: grab; }
522.arch-node { cursor: pointer; }
523.arch-node:hover circle { stroke-width: 3; }
524.view-head { position: absolute; top: 10px; left: 14px; z-index: 31; font-size: .8rem; color: #c8cede; background: #0d1117cc; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); }
525.view-hint { color: var(--muted); font-size: .72rem; margin-left: 8px; }
526.view-loading { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .9rem; }
527#city-canvas { width: 100%; height: 100%; display: block; }