/* ctx.ui: mod panels and HUD lines (modloader stage 8) */
body.debug-no-extra-ui .mod-hud,
body.debug-no-extra-ui .mod-custom-world,
body.debug-no-extra-ui .mod-custom-hud { display: none !important; }
#mod-panel { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.35); z-index: 11; }
.mod-panel { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.mod-panel h3, .mod-text { margin: 0; overflow-wrap: anywhere; }
.mod-body { display: flex; flex-direction: column; gap: 8px; }
.mod-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mod-button { min-height: 40px; touch-action: manipulation; }
.mod-input { min-height: 36px; flex: 1; min-width: 0; }
.mod-item { position: relative; display: inline-block; width: 32px; height: 32px; }
.mod-item canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.mod-item b { position: absolute; right: -2px; bottom: -4px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.mod-hud { position: fixed; display: flex; flex-direction: column; gap: 2px; pointer-events: none; font-size: 14px; text-shadow: 0 1px 2px #000; }
.mod-hud-top-right { top: 56px; right: 10px; align-items: flex-end; }
.mod-hud-top-left { top: 56px; left: 10px; }
.mod-hud-bottom-right { bottom: 80px; right: 10px; align-items: flex-end; }
.mod-custom-surface { max-width: calc(100vw - 24px); flex-shrink: 0; }
.mod-custom-surface[hidden] { display: none !important; }
.mod-custom-panel { max-height: calc(100vh - 32px); overflow: auto; pointer-events: auto; }
.mod-custom-world { position: fixed; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none; z-index: 2; }

/* Componentes visuais do SDK: estilos isolados, tons e ícones com nomes validados. */
.mod-tone-neutral { --mod-accent: #b1bdce; --mod-tint: rgba(177,189,206,.10); }
.mod-tone-info { --mod-accent: #7bc7f0; --mod-tint: rgba(123,199,240,.10); }
.mod-tone-success { --mod-accent: #80dfbd; --mod-tint: rgba(128,223,189,.10); }
.mod-tone-warning { --mod-accent: #f1c078; --mod-tint: rgba(241,192,120,.10); }
.mod-tone-danger { --mod-accent: #f39999; --mod-tint: rgba(243,153,153,.10); }
.mod-card {
  color: #edf3fa; background: linear-gradient(145deg, rgba(23,34,48,.96), rgba(11,18,29,.94));
  border: 1px solid rgba(173,199,225,.16); border-radius: 16px; padding: 18px;
  box-shadow: 0 10px 32px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.035);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; text-shadow: none; text-align: left;
  overflow-wrap: anywhere; min-width: 0;
}
.mod-card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mod-card-title { font-size: 12px; font-weight: 650; letter-spacing: .02em; color: #dce6f1; }
.mod-badge { color: var(--mod-accent); background: var(--mod-tint); border: 1px solid var(--mod-tint); border-radius: 999px; padding: 4px 8px; font-size: 10px; line-height: 1.2; font-weight: 600; }
.mod-card-subtitle { color: #8294aa; font-size: 10px; margin: 5px 0 0; line-height: 1.5; }
.mod-card-body { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.mod-card .mod-row { flex-wrap: nowrap; gap: 14px; }
.mod-card .mod-row > * { flex: 1; min-width: 0; }
.mod-stat { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mod-stat-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 44px; border-radius: 12px; flex-shrink: 0; color: var(--mod-accent); background: var(--mod-tint); }
.mod-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mod-stat-copy { display: flex; flex-direction: column; min-width: 0; }
.mod-stat-label { color: #8ea1b7; font-size: 9px; line-height: 1.4; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.mod-stat-value { color: #f2f6fc; font-size: 30px; line-height: 1.2; letter-spacing: -.055em; font-weight: 650; font-variant-numeric: tabular-nums; }
.mod-stat-value small { color: #8ea1b7; font-size: 14px; font-weight: 450; letter-spacing: 0; margin-left: 5px; }
.mod-stat-hint { color: #93a7bd; font-size: 10px; line-height: 1.5; margin-top: 2px; }
.mod-row .mod-stat-value { font-size: 17px; letter-spacing: -.02em; }
.mod-row .mod-stat-value small { font-size: 11px; }
.mod-meter-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #a5b4c6; font-size: 11px; }
.mod-meter-label .mod-icon { width: 14px; height: 14px; color: var(--mod-accent); }
.mod-meter-label b { margin-left: auto; color: #cbd6e3; font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mod-meter progress { display: block; width: 100%; height: 5px; margin-top: 2px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: #263345; color: var(--mod-accent); accent-color: var(--mod-accent); }
.mod-meter progress::-webkit-progress-bar { background: #263345; border-radius: 999px; }
.mod-meter progress::-webkit-progress-value { background: var(--mod-accent); border-radius: 999px; }
.mod-meter progress::-moz-progress-bar { background: var(--mod-accent); border-radius: 999px; }
.mod-hud-rich { width: 258px; max-width: calc(100vw - 24px); text-shadow: none; }
.mod-hud-rich .mod-card .mod-text { padding-top: 10px; border-top: 1px solid rgba(173,199,225,.10); color: #7f92a9; font-size: 10px; line-height: 1.5; }
.mod-panel:has(.mod-card) { border-radius: 18px; }
@media (max-width: 600px) {
  .mod-hud-rich { width: 210px; }
  .mod-hud-rich .mod-card { padding: 13px; border-radius: 13px; }
  .mod-hud-rich .mod-card-body { gap: 11px; margin-top: 13px; }
  .mod-hud-rich .mod-stat-value { font-size: 26px; }
  .mod-hud-rich .mod-row .mod-stat-value { font-size: 15px; }
}

/* In-game GUI (public/js/gui): the HTML HUD it replaces stays in the page, hidden */
body.gui-hud #hotbar, body.gui-hud #stats, body.gui-hud #block-name { display: none !important; }
body.gui-hud #xp-bar, body.gui-hud #effects-hud { display: none !important; }
