/* ============================================================
   Panel "Nebel Clumsy V8.1" · réplica 3D de la tercera referencia (tema magenta)
   Ventana flotante en perspectiva, partes en capas (translateZ) y niebla
   magenta en WebGL de fondo. Textos: js/textos.js (claves nc.*) · Lógica: js/clumsy.js
   ============================================================ */
#clumsy { padding-top: 30px; background: radial-gradient(60% 50% at 50% 55%, rgba(226, 60, 154, .10), transparent 70%); }
.nc-stage { position: relative; perspective: 2200px; perspective-origin: 50% 40%; padding: 10px 0 70px; }
.nc-float { position: relative; width: min(100%, 1060px); margin-inline: auto; transform-style: preserve-3d; will-change: transform; transition: width .45s var(--ease); }
.nc-float.wide { width: 100%; }
.nc {
  --mag: #e23c9a; --mag2: #ff6cc0; --btn: #7a1b5a; --btn2: #9b2a78; --chk: #8e3b9e; --ln: #c0348a; --ok: #3ddc84; --tx: #f1e8f3; --mu: #b79bbb; --in: #220d26;
  position: relative; transform-style: preserve-3d;
  display: flex; flex-direction: column;
  font: 500 13px/1.35 var(--f-b); color: var(--tx);
  border-radius: 10px;
  box-shadow: 0 70px 120px rgba(0, 0, 0, .65), 0 0 90px rgba(226, 60, 154, .18);
  transition: transform .4s var(--ease), opacity .4s, filter .4s;
}
.nc::before { content: ''; position: absolute; inset: -1px; border-radius: 11px; pointer-events: none; padding: 1px; background: linear-gradient(140deg, rgba(255, 108, 192, .7), rgba(255, 255, 255, .05) 35%, rgba(255, 255, 255, .03) 65%, rgba(226, 60, 154, .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.nc.off { transform: scale(.88) translateZ(0); opacity: 0; filter: brightness(2.2) saturate(0); pointer-events: none; }
.nc.boot { animation: nlboot .7s var(--ease); }
.nc.nc-sweep::after { content: ''; position: absolute; inset: 0; border-radius: 10px; pointer-events: none; transform: translateZ(70px); background: linear-gradient(100deg, transparent 35%, rgba(255, 108, 192, .22) 50%, transparent 65%); background-size: 250% 100%; animation: nmsweep 1.1s var(--ease) forwards; }

/* Fondo: color base + canvas de niebla (WebGL) */
.nc-bg { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; background: #1c0b1c; }
.nc-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
html.lite .nc-bg { background: radial-gradient(120% 90% at 50% 0%, #2a0f2d, #1c0b1c 60%, #120713); }   /* modo liviano: sin niebla WebGL */
html.lite .nc-bg canvas { display: none; }
.nc-bg::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 30%, rgba(0, 0, 0, .28)); }
.nc-shadow { position: absolute; left: 10%; right: 10%; bottom: -60px; height: 90px; border-radius: 50%; background: radial-gradient(closest-side, rgba(226, 60, 154, .4), transparent); filter: blur(24px); transform: translateZ(-120px) rotateX(80deg); pointer-events: none; }
.nc-z1 { transform: translateZ(14px); }
.nc-z2 { transform: translateZ(30px); }
.nc-z3 { transform: translateZ(46px); }

/* Barra de título */
.nc-title { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 6px 0 10px; background: rgba(18, 7, 20, .85); border-bottom: 1px solid rgba(226, 60, 154, .25); border-radius: 10px 10px 0 0; }
.nc-ico { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; background: #2a0f2d; box-shadow: inset 0 0 0 1px rgba(255, 108, 192, .5); }
.nc-ico svg { width: 10px; height: 12px; }
.nc-name { font: 600 13px/1 var(--f-b); color: #fff; }
.nc-name span { color: var(--mu); font-weight: 500; }
.nc-wins { margin-left: auto; display: flex; gap: 2px; }
.nc-win { width: 36px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: #c9b8cc; transition: background .2s, color .2s; }
.nc-win .ico { width: 14px; height: 14px; }
.nc-win:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nc-win.nc-x:hover { background: #e81123; color: #fff; }

/* Cuerpo: columna izquierda + principal */
.nc-body { position: relative; display: grid; grid-template-columns: 322px minmax(0, 1fr); transform-style: preserve-3d; transform-origin: 50% 0; transition: opacity .45s, transform .45s var(--ease), height .45s var(--ease); }
.nc-body.min { opacity: 0; transform: scaleY(0) translateZ(0); pointer-events: none; }
.nc-side { position: relative; display: grid; gap: 8px; align-content: start; padding: 10px 12px 12px; border-right: 1px solid rgba(226, 60, 154, .22); background: rgba(28, 11, 28, .55); border-radius: 0 0 0 10px; }
.nc-h { font: 700 14px/1 var(--f-b); color: var(--mag); }
.nc-field { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; font-weight: 600; }
.nc-sel { position: relative; display: block; min-width: 0; }
.nc-sel select, .nc-field input, .nc-cfg input, .nc-send input, .nc-val input { width: 100%; height: 26px; padding: 0 8px; font: 500 13px/1 var(--f-b); color: var(--tx); background: var(--in); border: 1px solid rgba(226, 60, 154, .45); border-radius: 4px; outline: none; transition: border-color .2s, box-shadow .2s; }
.nc-sel select { appearance: none; -webkit-appearance: none; padding-right: 26px; cursor: pointer; }
.nc-sel select option { background: #220d26; }
.nc-sel::after { content: ''; position: absolute; right: 9px; top: 50%; width: 0; height: 0; margin-top: -2px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #fff; pointer-events: none; }
.nc-sel select:focus, .nc-field input:focus, .nc-cfg input:focus, .nc-send input:focus, .nc-val input:focus { border-color: var(--mag2); box-shadow: 0 0 0 2px rgba(226, 60, 154, .25); }
.nc-hr { border: 0; height: 1px; margin: 2px 0; background: linear-gradient(90deg, var(--ln), rgba(192, 52, 138, .2)); }
.nc-cfg { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.nc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 4px; font: 600 12.5px/1 var(--f-b); color: #fff; background: var(--btn); box-shadow: inset 0 0 0 1px rgba(255, 108, 192, .25); white-space: nowrap; transition: background .2s, transform .15s; }
.nc-btn:hover { background: var(--btn2); }
.nc-btn:active { transform: scale(.97); }
.nc-btn .ico { width: 13px; height: 13px; }
.nc-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.nc-opts { display: grid; gap: 7px; padding-top: 2px; }
.nc-optlist { display: grid; gap: 7px; }
.nc-chk { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; user-select: none; }
.nc-chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.nc-chk i { position: relative; width: 15px; height: 15px; flex: none; border-radius: 3px; background: #2a1030; border: 1px solid var(--chk); transition: background .15s; }
.nc-chk i::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) scale(0); transition: transform .15s var(--ease); }
.nc-chk input:checked + i { background: var(--chk); }
.nc-chk input:checked + i::after { transform: rotate(45deg) scale(1); }
.nc-chk input:focus-visible + i { outline: 2px solid var(--mag2); outline-offset: 2px; }
.nc-slide { display: flex; align-items: center; gap: 8px; padding-left: 22px; transition: opacity .25s; }
.nc-slide.off { opacity: .35; pointer-events: none; }
.nc-slide input { -webkit-appearance: none; appearance: none; width: 70px; height: 4px; border-radius: 2px; outline: none; cursor: pointer; background: linear-gradient(90deg, var(--mag) var(--p, 24%), #3a1a3e var(--p, 24%)); }
.nc-slide input::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 16px; border-radius: 3px; background: #ff5fb8; box-shadow: 0 0 8px rgba(255, 95, 184, .6); }
.nc-slide input::-moz-range-thumb { width: 10px; height: 16px; border: 0; border-radius: 3px; background: #ff5fb8; }
.nc-slide output { font: 600 13px/1 var(--f-b); }
.nc-big { width: 200px; height: 36px; margin-top: 4px; border-radius: 5px; font: 700 13px/1 var(--f-b); color: #fff; background: linear-gradient(180deg, #8d2068, #6a1750); box-shadow: 0 0 18px rgba(226, 60, 154, .35), inset 0 1px 0 rgba(255, 255, 255, .15); transition: transform .2s, filter .2s; }
.nc-big:hover { transform: translateY(-1px); filter: brightness(1.12); }
.nc-foot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; }
/* fila Hotkey Binding (reemplaza al checkbox + reloj de sesión; textos en admin → Clumsy → Options and hotkey) */
.nc-hotkey { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.nc-hk-lab { font-weight: 700; color: var(--mag); }
.nc-bind.on { background: var(--mag); color: #1a0a1a; animation: ping 1s infinite; }
.nc-bound { font-size: 12.5px; color: var(--mu); }
.nc-bound b { color: #fff; font-weight: 700; }
.nc-modlab { display: inline-flex; align-items: center; height: 26px; font-weight: 700; color: #fff; }
.nc-ver { font-size: 11px; color: var(--mu); }
.nc-prog { position: relative; grid-column: 1 / -1; height: 3px; border-radius: 2px; background: #2a1030; overflow: hidden; }
.nc-prog::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(90deg, transparent, var(--mag), transparent); animation: ncprog 2.4s linear infinite; }
@keyframes ncprog { to { left: 100%; } }

/* Principal: barra, grilla de módulos y chat */
.nc-main { position: relative; display: grid; grid-template-rows: auto auto 1fr; gap: 10px; padding: 10px 12px 12px; min-width: 0; transform-style: preserve-3d; background: rgba(20, 8, 22, .42); border-radius: 0 0 10px 0; }
.nc-top { display: flex; align-items: center; gap: 10px; }
.nc-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 4px; background: var(--in); border: 1px solid rgba(226, 60, 154, .45); font-weight: 600; white-space: nowrap; }
.nc-pill b { font-weight: 700; color: #fff; }
.nc-pill .nc-ok { color: var(--ok); }
.nc-pill-sm { height: 22px; padding: 0 8px; font-size: 11.5px; }
.nc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: ping 2s infinite; }
.nc-dc { margin-left: auto; }
.nc-badges { display: grid; gap: 4px; justify-items: end; }
/* botones de modo (OGFN Mode / Show AP): más oscuros que Discord, se prenden al tocarlos */
.nc-mode { height: 24px; padding: 0 12px; font-size: 12px; background: #4a1342; box-shadow: inset 0 0 0 1px rgba(255, 108, 192, .3); }
.nc-mode:hover { background: #63195a; }
.nc-mode[aria-pressed="true"] { background: var(--mag); color: #fff; box-shadow: 0 0 12px rgba(255, 63, 208, .5); }
.nc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; align-content: start; }
.nc-grp { display: grid; gap: 4px; }
.nc-grp > .nc-chk { width: 100%; }
.nc-dots { flex: 1; height: 0; margin-bottom: -5px; border-bottom: 2px dotted rgba(255, 255, 255, .35); }
.nc-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-left: 22px; transition: opacity .25s; }
.nc-sub.off { opacity: .35; pointer-events: none; }
.nc-val { display: inline-flex; align-items: center; gap: 6px; }
.nc-val i { font-style: normal; font-weight: 700; }
.nc-val input { width: 58px; height: 22px; text-align: center; font-family: var(--f-m); font-size: 12px; }
.nc-chat { display: grid; grid-template-rows: auto auto minmax(96px, 1fr) auto; gap: 4px; min-height: 180px; }
.nc-tabs { display: flex; gap: 2px; }
.nc-tab { padding: 5px 10px; border-radius: 4px 4px 0 0; font: 600 12.5px/1 var(--f-b); color: #d9c9dc; background: #2a1030; transition: background .2s, color .2s; }
.nc-tab.on { background: var(--ln); color: #fff; }
.nc-chat-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.nc-chat-h > b { color: var(--mag); }
.nc-online { color: var(--ok); font-weight: 700; }
.nc-msgs { height: 110px; overflow-y: auto; padding: 6px 8px; border-radius: 4px; background: #150915; border: 1px solid rgba(226, 60, 154, .45); scrollbar-width: thin; scrollbar-color: #7a1b5a transparent; }
.nc-msg { display: flex; flex-wrap: wrap; gap: 0 6px; font: 500 12.5px/1.5 var(--f-b); color: #fff; animation: nlin .25s var(--ease); }
.nc-tag { font-weight: 700; }
.nc-tag.owner { color: #2ecc71; }
.nc-tag.dev { color: #22d3ee; }
.nc-tag.mod { color: #f5a623; }
.nc-tag.ai { color: var(--mag2); }
.nc-tag.you { color: #ff8ad0; }
.nc-tag.sys { color: var(--mu); }
.nc-tag.user { color: #5aa0ff; }
.nc-tag.name { color: #9b8cff; }
.nc-msg.sys span { color: var(--mu); font-style: italic; }
.nc-msg.typing span { color: var(--mu); letter-spacing: .2em; animation: nlblink .8s steps(2) infinite; }
.nc-send { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.nc-toast { position: absolute; left: 50%; bottom: 14px; padding: 7px 14px; border-radius: 6px; background: #2a1030; border: 1px solid var(--ln); color: #fff; font: 600 12.5px/1 var(--f-b); box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 18px rgba(226, 60, 154, .35); opacity: 0; pointer-events: none; transform: translate(-50%, 10px) translateZ(80px); transition: opacity .25s, transform .25s var(--ease); }
.nc-toast.on { opacity: 1; transform: translate(-50%, 0) translateZ(80px); }

@media (max-width: 980px) {
  .nc-body { grid-template-columns: 1fr; }
  .nc-side { border-right: 0; border-radius: 0; border-bottom: 1px solid rgba(226, 60, 154, .22); }
}
@media (max-width: 760px) {
  .nc-stage { padding-bottom: 40px; }
  .nc-grid { grid-template-columns: 1fr; }
  .nc-cfg { grid-template-columns: 1fr 1fr; }
  .nc-cfg .nc-btn { grid-column: 1 / -1; }
  .nc-top { flex-wrap: wrap; }
  .nc-dc { margin-left: 0; }
  .nc-badges { grid-auto-flow: column; justify-items: start; }
  .nc-big { width: 100%; }
  .nc-z1, .nc-z2, .nc-z3 { transform: none; }
  .nc-toast { transform: translate(-50%, 10px); }
  .nc-toast.on { transform: translate(-50%, 0); }
}
