/* GameInspect 功能面板 / 弹窗 — 统一深色专业风格（覆盖 devpanel.js 注入样式） */

.copilot-root .inspect-pane {
    --modal-bg: #161b22;
    --modal-surface: #21262d;
    --modal-surface-2: #1c2333;
    --modal-border: #30363d;
    --modal-accent: #0e639c;
    --modal-accent-hover: #1177bb;
    --modal-text: #c9d1d9;
    --modal-text-muted: #8b949e;
    --modal-danger: #da3633;
    --modal-warn: #e3b341;
    --modal-link: #58a6ff;
}

/* ── 全屏功能面板 ── */
.copilot-root .inspect-pane #codeEditorView,
.copilot-root .inspect-pane #gameControlView,
.copilot-root .inspect-pane #gamePerformanceView,
.copilot-root .inspect-pane #skeletonAssetView {
    background: var(--modal-bg) !important;
    color: var(--modal-text) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    text-align: left;
}

/* 仅用户主动打开时展示，避免 !important 覆盖 devpanel 的 toggle(false) */
.copilot-root .inspect-pane #codeEditorView.gi-panel-open:not([hidden]),
.copilot-root .inspect-pane #gameControlView.gi-panel-open:not([hidden]),
.copilot-root .inspect-pane #gamePerformanceView.gi-panel-open:not([hidden]),
.copilot-root .inspect-pane #skeletonAssetView.gi-panel-open:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

.copilot-root .inspect-pane #codeEditorView[hidden],
.copilot-root .inspect-pane #gameControlView[hidden],
.copilot-root .inspect-pane #gamePerformanceView[hidden],
.copilot-root .inspect-pane #skeletonAssetView[hidden] {
    display: none !important;
}

.copilot-root .inspect-pane #gamePerformanceView[hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ── 面板顶栏 ── */
.copilot-root .inspect-pane .codeEditorTop,
.copilot-root .inspect-pane .gameControlTop,
.copilot-root .inspect-pane .gamePerformanceTop {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px;
    background: linear-gradient(180deg, #1a2332 0%, var(--modal-surface) 100%) !important;
    border-bottom: 1px solid var(--modal-border);
    padding: 0 12px;
    box-sizing: border-box;
}

.copilot-root .inspect-pane .codeEditorTitle,
.copilot-root .inspect-pane .gameControlTitle,
.copilot-root .inspect-pane .gamePerformanceTitle {
    position: static !important;
    width: auto !important;
    text-align: center;
    color: var(--modal-text) !important;
    font-size: 14px !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.copilot-root .inspect-pane .codeEditorTitleRight,
.copilot-root .inspect-pane .gameControlTitleRight,
.copilot-root .inspect-pane .gamePerformanceTitleRight {
    position: absolute !important;
    right: 8px;
    top: 50% !important;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.copilot-root .inspect-pane .codeEditorTitleRight button,
.copilot-root .inspect-pane .gameControlTitleRight button,
.copilot-root .inspect-pane .gamePerformanceTitleRight button {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    background: var(--modal-surface-2) !important;
    border: 1px solid var(--modal-border) !important;
    color: var(--modal-text) !important;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.copilot-root .inspect-pane .codeEditorTitleRight button:hover,
.copilot-root .inspect-pane .gameControlTitleRight button:hover,
.copilot-root .inspect-pane .gamePerformanceTitleRight button:hover {
    background: var(--modal-accent) !important;
    border-color: var(--modal-accent-hover) !important;
    color: #fff !important;
}

/* ── 注入代码：工具栏 ── */
.copilot-root .inspect-pane .codeEditorTools {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 8px 10px !important;
    height: auto !important;
    min-height: 38px;
    width: 100% !important;
    background: var(--modal-surface) !important;
    border-bottom: 1px solid var(--modal-border);
    color: var(--modal-text-muted) !important;
    font-size: 11px !important;
}

.copilot-root .inspect-pane .codeEditorTools span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.copilot-root .inspect-pane .codeEditorTools select,
.copilot-root .inspect-pane #codeEditorView select {
    height: 26px;
    min-width: 100px;
    padding: 0 8px;
    background: #0d1117 !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: 4px;
    color: var(--modal-text) !important;
    font-size: 11px;
    outline: none;
}

.copilot-root .inspect-pane .codeEditorTools select:focus,
.copilot-root .inspect-pane #codeEditorView select:focus {
    border-color: var(--modal-accent) !important;
}

.copilot-root .inspect-pane .codeEditorPlayTxt {
    color: var(--modal-link) !important;
    margin-left: 0 !important;
    font-size: 11px !important;
    align-items: center;
}

.copilot-root .inspect-pane .codeEditorPlay {
    height: 16px !important;
    width: 16px !important;
    border: 2px solid var(--modal-border) !important;
    background: rgba(88, 166, 255, 0.15) !important;
    margin-left: 4px;
}

.copilot-root .inspect-pane .codeEditorPlay::after {
    font-size: 10px !important;
    color: var(--modal-link) !important;
    top: -2px !important;
    left: 2px !important;
}

.copilot-root .inspect-pane #codeEditorSaveOper {
    margin-left: 0 !important;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.copilot-root .inspect-pane #codeEditorSplit {
    background: var(--modal-border) !important;
    height: 4px;
}

.copilot-root .inspect-pane .codeEditorTop,
.copilot-root .inspect-pane .codeEditorTools,
.copilot-root .inspect-pane #codeEditorSplit,
.copilot-root .inspect-pane #codeEditorOutputSplit {
    flex-shrink: 0;
}

.copilot-root .inspect-pane .codeRuleEditor {
    font-size: 12px !important;
    min-height: 60px !important;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--modal-border);
    overflow: hidden;
}

.copilot-root .inspect-pane #codeEditor {
    font-size: 13px !important;
    flex: 0 0 auto !important;
    min-height: 80px !important;
    overflow: hidden;
}

.copilot-root .inspect-pane #codeEditorOutputSplit {
    background: var(--modal-border) !important;
    height: 4px;
    cursor: ns-resize;
    flex-shrink: 0;
    touch-action: none;
    user-select: none;
}

.copilot-root .inspect-pane #codeEditorOutputSplit.codeEditorOutputSplit-active {
    background: var(--modal-accent, #0e639c) !important;
}

.copilot-root .inspect-pane #codeEditorOutput {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 60px;
    border-top: 1px solid var(--modal-border);
    overflow: hidden;
}

.copilot-root .inspect-pane .codeEditorOutputBgLabel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    cursor: pointer;
    color: var(--modal-text-muted);
    font-size: 10px;
}

.copilot-root .inspect-pane .codeEditorOutputBgText {
    white-space: nowrap;
}

.copilot-root .inspect-pane .codeEditorOutputBgPick {
    width: 22px;
    height: 18px;
    padding: 0;
    border: 1px solid var(--modal-border);
    border-radius: 3px;
    cursor: pointer;
    background: transparent;
}

.copilot-root .inspect-pane .codeEditorOutputBgPick::-webkit-color-swatch-wrapper {
    padding: 1px;
}

.copilot-root .inspect-pane .codeEditorOutputBgPick::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.copilot-root .inspect-pane .codeEditorOutputToolbar {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: var(--inspect-surface, #21262d);
    border-bottom: 1px solid var(--modal-border);
    flex-shrink: 0;
}

.copilot-root .inspect-pane .codeEditorOutputToolbarMain {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 4px 8px;
}

.copilot-root .inspect-pane .codeEditorOutputClear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 22px;
    padding: 0;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid var(--modal-border);
    background: var(--inspect-surface-2, #1c2333);
    color: var(--inspect-text-muted, #8b949e);
    cursor: pointer;
    overflow: visible;
}

.copilot-root .inspect-pane .codeEditorOutputClear:hover {
    border-color: var(--inspect-accent, #0e639c);
    color: #fff;
}

.copilot-root .inspect-pane .codeEditorOutputClearIcon {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.copilot-root .inspect-pane .codeEditorOutputAiAnalyze {
    flex-shrink: 0;
    padding: 1px 8px;
    font-size: 10px;
    line-height: 18px;
    border-radius: 3px;
    border: 1px solid #4a3040;
    background: #2a1a22;
    color: #e8a0b0;
    cursor: pointer;
}

.copilot-root .inspect-pane .codeEditorOutputAiAnalyze:hover {
    border-color: #8b2942;
    color: #fff;
}

.copilot-root .inspect-pane .codeEditorOutputAnalyzeBtn {
    flex-shrink: 0;
    margin-left: 6px;
    padding: 0 6px;
    font-size: 10px;
    line-height: 16px;
    border-radius: 3px;
    border: 1px solid #4a3040;
    background: transparent;
    color: #e8a0b0;
    cursor: pointer;
}

.copilot-root .inspect-pane .codeEditorOutputAnalyzeBtn:hover {
    background: #2a1a22;
    color: #fff;
}

.copilot-root .inspect-pane .codeEditorOutputSource {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.copilot-root .inspect-pane .codeEditorOutputSourceBtn {
    padding: 1px 6px;
    font-size: 10px;
    line-height: 16px;
    border-radius: 3px;
    border: 1px solid var(--modal-border);
    background: var(--inspect-surface-2, #1c2333);
    color: var(--inspect-text-muted, #8b949e);
    cursor: pointer;
    opacity: 0.55;
}

.copilot-root .inspect-pane .codeEditorOutputSourceBtn.is-active {
    opacity: 1;
    color: #c9d1d9;
    border-color: #484f58;
}

.copilot-root .inspect-pane .codeEditorOutputSourceBtn[data-source="inject"].is-active {
    color: #d2a8ff;
    border-color: #8957e566;
}

.copilot-root .inspect-pane .codeEditorOutput-source {
    flex: 0 0 auto;
    min-width: 24px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #d2a8ff;
    border: 1px solid rgba(137, 87, 229, 0.45);
    border-radius: 3px;
    background: rgba(137, 87, 229, 0.12);
}

.copilot-root .inspect-pane .codeEditorOutput-source-system {
    color: #a371f7;
    border-color: rgba(163, 113, 247, 0.45);
    background: rgba(163, 113, 247, 0.1);
}

.copilot-root .inspect-pane .codeEditorOutput-inject {
    border-left: 2px solid #8957e5;
    background: rgba(137, 87, 229, 0.05);
}

.copilot-root .inspect-pane .codeEditorOutputToolbar span.codeEditorOutputTitle {
    flex: 0 0 auto;
    color: var(--inspect-text-muted, #8b949e);
    font-size: 11px;
    font-weight: 600;
}

.copilot-root .inspect-pane .codeEditorOutputLevels {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.copilot-root .inspect-pane .codeEditorOutputLevel {
    padding: 1px 6px;
    font-size: 10px;
    line-height: 16px;
    border-radius: 3px;
    border: 1px solid var(--modal-border);
    background: var(--inspect-surface-2, #1c2333);
    color: var(--inspect-text-muted, #8b949e);
    cursor: pointer;
    opacity: 0.45;
}

.copilot-root .inspect-pane .codeEditorOutputLevel.is-active {
    opacity: 1;
}

.copilot-root .inspect-pane .codeEditorOutputLevel[data-level="log"].is-active {
    color: #c9d1d9;
    border-color: #484f58;
}

.copilot-root .inspect-pane .codeEditorOutputLevel[data-level="info"].is-active {
    color: #79c0ff;
    border-color: #388bfd66;
}

.copilot-root .inspect-pane .codeEditorOutputLevel[data-level="warn"].is-active {
    color: #e3b341;
    border-color: #d2992266;
}

.copilot-root .inspect-pane .codeEditorOutputLevel[data-level="error"].is-active {
    color: #f97583;
    border-color: #f8514966;
}

.copilot-root .inspect-pane .codeEditorOutputLevel[data-level="system"].is-active {
    color: #a371f7;
    border-color: #8957e566;
}

.copilot-root .inspect-pane .codeEditorOutputFilter {
    flex: 1 1 100px;
    min-width: 80px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid var(--modal-border);
    border-radius: 4px;
    background: #0d1117;
    color: var(--modal-text);
    font-size: 11px;
    outline: none;
}

.copilot-root .inspect-pane .codeEditorOutputFilter:focus {
    border-color: var(--modal-accent, #0e639c);
}

.copilot-root .inspect-pane .codeEditorOutputSearch {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #161b22;
    border-bottom: 1px solid var(--modal-border);
    flex-shrink: 0;
}

.copilot-root .inspect-pane .codeEditorOutputSearch[hidden] {
    display: none !important;
}

.copilot-root .inspect-pane .codeEditorOutputSearchInput {
    flex: 1;
    height: 22px;
    padding: 0 8px;
    border: 1px solid var(--modal-border);
    border-radius: 4px;
    background: #0d1117;
    color: var(--modal-text);
    font-size: 11px;
    outline: none;
}

.copilot-root .inspect-pane .codeEditorOutputSearchCount {
    min-width: 36px;
    text-align: center;
    font-size: 10px;
    color: var(--inspect-text-muted, #8b949e);
}

.copilot-root .inspect-pane .codeEditorOutputSearchPrev,
.copilot-root .inspect-pane .codeEditorOutputSearchNext,
.copilot-root .inspect-pane .codeEditorOutputSearchClose {
    padding: 0 6px;
    min-width: 22px;
    height: 22px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid var(--modal-border);
    background: var(--inspect-surface-2, #1c2333);
    color: var(--inspect-text, #c9d1d9);
    cursor: pointer;
}

.copilot-root .inspect-pane .codeEditorOutputToolbar button {
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 4px;
    border: 1px solid var(--modal-border);
    background: var(--inspect-surface-2, #1c2333);
    color: var(--inspect-text, #c9d1d9);
    cursor: pointer;
}

.copilot-root .inspect-pane .codeEditorOutputToolbar button:hover {
    border-color: var(--inspect-accent, #0e639c);
    color: #fff;
}

.copilot-root .inspect-pane .codeEditorOutputList {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
}

.copilot-root .inspect-pane .codeEditorOutput-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 3px 8px;
    word-break: break-all;
    border-bottom: 1px solid rgba(48, 54, 61, 0.35);
    color: #c9d1d9;
}

.copilot-root .inspect-pane .codeEditorOutput-item:hover {
    background: rgba(88, 166, 255, 0.06);
}

.copilot-root .inspect-pane .codeEditorOutput-item.is-search-current {
    background: rgba(227, 179, 65, 0.15);
    outline: 1px solid rgba(227, 179, 65, 0.45);
}

.copilot-root .inspect-pane .codeEditorOutput-icon {
    flex: 0 0 14px;
    width: 14px;
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
    opacity: 0.85;
}

.copilot-root .inspect-pane .codeEditorOutput-badge {
    flex: 0 0 auto;
    min-width: 28px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

.copilot-root .inspect-pane .codeEditorOutput-msg {
    flex: 1 1 auto;
    min-width: 0;
    white-space: pre-wrap;
}

.copilot-root .inspect-pane .codeEditorOutput-mark {
    background: rgba(227, 179, 65, 0.35);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.copilot-root .inspect-pane .codeEditorOutput-log {
    border-left: 2px solid transparent;
}

.copilot-root .inspect-pane .codeEditorOutput-log .codeEditorOutput-icon,
.copilot-root .inspect-pane .codeEditorOutput-log .codeEditorOutput-badge {
    color: #c9d1d9;
}

.copilot-root .inspect-pane .codeEditorOutput-info {
    border-left: 2px solid #388bfd;
}

.copilot-root .inspect-pane .codeEditorOutput-info .codeEditorOutput-icon,
.copilot-root .inspect-pane .codeEditorOutput-info .codeEditorOutput-badge {
    color: #79c0ff;
}

.copilot-root .inspect-pane .codeEditorOutput-warn {
    border-left: 2px solid #d29922;
    background: rgba(227, 179, 65, 0.04);
}

.copilot-root .inspect-pane .codeEditorOutput-warn .codeEditorOutput-icon,
.copilot-root .inspect-pane .codeEditorOutput-warn .codeEditorOutput-badge {
    color: #e3b341;
}

.copilot-root .inspect-pane .codeEditorOutput-error {
    border-left: 2px solid #f85149;
    background: rgba(248, 81, 73, 0.06);
}

.copilot-root .inspect-pane .codeEditorOutput-error .codeEditorOutput-icon,
.copilot-root .inspect-pane .codeEditorOutput-error .codeEditorOutput-badge {
    color: #f97583;
}

.copilot-root .inspect-pane .codeEditorOutput-notice {
    border-left: 2px solid #e8a4c4;
    background: rgba(248, 215, 232, 0.12);
}

.copilot-root .inspect-pane .codeEditorOutput-notice .codeEditorOutput-icon,
.copilot-root .inspect-pane .codeEditorOutput-notice .codeEditorOutput-badge,
.copilot-root .inspect-pane .codeEditorOutput-notice .codeEditorOutput-msg {
    color: #f0c4d8;
}

.copilot-root .inspect-pane .codeEditorOutput-system {
    border-left: 2px solid #8957e5;
}

.copilot-root .inspect-pane .codeEditorOutput-system .codeEditorOutput-icon,
.copilot-root .inspect-pane .codeEditorOutput-system .codeEditorOutput-badge {
    color: #a371f7;
}

.copilot-root .inspect-pane .codeEditorOutput-empty {
    padding: 12px;
    color: var(--inspect-text-muted, #8b949e);
    text-align: center;
    font-size: 12px;
}

/* ── 控制台值渲染（类 DevTools） ── */
.copilot-root .inspect-pane .codeEditorOutput-msg .cv-node {
    display: inline;
    vertical-align: top;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-toggle {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 2px 0 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #8b949e;
    font-size: 9px;
    line-height: 14px;
    cursor: pointer;
    vertical-align: top;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-toggle:hover {
    color: #c9d1d9;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-inline-preview {
    color: #c9d1d9;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-node.is-expanded > .cv-inline-preview {
    color: #8b949e;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-block {
    display: block;
    margin: 2px 0 2px 16px;
    padding-left: 8px;
    border-left: 1px solid rgba(48, 54, 61, 0.8);
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-string-block {
    max-width: min(900px, 88vw);
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-string-full {
    margin: 2px 0;
    padding: 6px 8px;
    max-height: 240px;
    overflow: auto;
    border: 1px solid rgba(48, 54, 61, 0.7);
    border-radius: 4px;
    background: rgba(13, 17, 23, 0.75);
    color: #a5d6ff;
    white-space: pre-wrap;
    word-break: break-word;
    font: inherit;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-block[hidden] {
    display: none !important;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-row {
    display: block;
    padding: 1px 0;
    white-space: pre-wrap;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-row-meta {
    color: #8b949e;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-index {
    display: inline-block;
    min-width: 20px;
    color: #6e7681;
    user-select: none;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-key {
    color: #79c0ff;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-constructor {
    color: #c9d1d9;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-punc {
    color: #8b949e;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-dim,
.copilot-root .inspect-pane .codeEditorOutput-msg .cv-preview-ref {
    color: #8b949e;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-string {
    color: #a5d6ff;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-number {
    color: #79c0ff;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-boolean {
    color: #ff7b72;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-null,
.copilot-root .inspect-pane .codeEditorOutput-msg .cv-symbol {
    color: #6e7681;
    font-style: italic;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-function {
    color: #dcdcaa;
    font-style: italic;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-regexp {
    color: #ce9178;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-date {
    color: #b5cea8;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-error-val {
    color: #f97583;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-preview {
    color: #c9d1d9;
}

.copilot-root .inspect-pane .codeEditorOutput-msg .cv-more {
    color: #6e7681;
    font-style: italic;
    padding: 2px 0;
}

.copilot-root .inspect-pane #codeEditorNameError {
    color: #f97583 !important;
}

.copilot-root .inspect-pane #codeEditorSaveName {
    height: 26px;
    padding: 0 8px;
    background: #0d1117;
    border: 1px solid var(--modal-border);
    border-radius: 4px;
    color: var(--modal-text);
    font-size: 11px;
}

/* ── 抓帧 & Shader ── */
.copilot-root .inspect-pane .gameControlTools {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px !important;
    margin: 12px !important;
    background: var(--modal-surface) !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: 8px;
    color: var(--modal-text) !important;
    font-size: 12px !important;
    position: relative !important;
    left: auto !important;
    transform: none !important;
}

.copilot-root .inspect-pane .gameControlTools button {
    height: auto !important;
    min-height: 34px;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    color: #fff !important;
    background: var(--modal-accent) !important;
    border: 1px solid var(--modal-accent-hover) !important;
    cursor: pointer;
    transition: background 0.15s;
}

.copilot-root .inspect-pane .gameControlTools button:hover {
    background: var(--modal-accent-hover) !important;
}

.copilot-root .inspect-pane .gameControlTitle2 {
    font-size: 11px !important;
    color: var(--modal-text-muted) !important;
    background: var(--modal-surface-2) !important;
    border: 1px solid var(--modal-border);
    border-radius: 4px;
    padding: 3px 8px !important;
    margin-right: 0 !important;
}

.copilot-root .inspect-pane .gameControlCanvasContain {
    background: #0d1117;
    padding: 8px;
}

.copilot-root .inspect-pane .gameControlDrawDetialView {
    background: var(--modal-surface) !important;
    color: var(--modal-text) !important;
    border-top: 1px solid var(--modal-border);
}

.copilot-root .inspect-pane .gameControlDrawDetialTop {
    padding: 8px 10px !important;
    background: var(--modal-surface-2) !important;
    border-bottom: 1px solid var(--modal-border);
}

.copilot-root .inspect-pane .drawDetialFrame {
    color: #7ee787 !important;
    font-size: 12px !important;
}

.copilot-root .inspect-pane .drawDetialCurFrame {
    width: 48px;
    padding: 2px 6px;
    border: 1px solid var(--modal-border) !important;
    border-radius: 4px;
    background: #0d1117;
    color: var(--modal-text) !important;
    font-size: 12px !important;
}

.copilot-root .inspect-pane .webglCodeNeedRefushMask {
    background: var(--modal-surface-2) !important;
    color: var(--modal-warn) !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    padding: 16px;
    border-radius: 6px;
    margin: 8px;
}

.copilot-root .inspect-pane .webglCodeNeedRefushMask #webglCodeRefush {
    width: auto;
    min-width: 88px;
    height: 32px;
    margin-top: 8px;
    padding: 0 12px;
    background: var(--modal-accent);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.copilot-root .inspect-pane .webglCodeContain {
    background: #0d1117 !important;
}

.copilot-root .inspect-pane .webglCodeList {
    height: auto !important;
    min-height: 28px;
    padding: 4px 8px !important;
    background: var(--modal-surface) !important;
    color: var(--modal-text-muted) !important;
    border-bottom: 1px solid var(--modal-border);
    line-height: 1.5 !important;
    gap: 4px !important;
}

/* ── 游戏性能 ── */
.copilot-root .inspect-pane #gamePerformanceView > .topButton {
    margin: 6px 4px 6px 8px !important;
}

.copilot-root .inspect-pane #gamePerformanceView > span {
    color: var(--modal-text-muted);
    font-size: 11px;
    margin-left: 4px;
}

.copilot-root .inspect-pane #gamePerformanceView > span label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.copilot-root .inspect-pane .gamePerformanceCanvasContain {
    background: var(--modal-surface-2) !important;
    padding: 8px 10px;
    overflow: auto;
}

.copilot-root .inspect-pane .gamePerformanceCanvas {
    width: 100% !important;
    display: block;
    box-sizing: border-box;
}

.copilot-root .inspect-pane .gamePerformanceLoadData {
    color: #ffa657 !important;
}

.copilot-root .inspect-pane .gamePerformanceLoadDataDes {
    color: var(--modal-link) !important;
}

.copilot-root .inspect-pane .gamePerformanceLoadDataCalue {
    color: #e3b341 !important;
}

.copilot-root .inspect-pane .gamePerformanceLoadDataTime {
    color: #d2a8ff !important;
}

/* ── 功能面板内按钮（统一） ── */
.copilot-root .inspect-pane #codeEditorView .topButton,
.copilot-root .inspect-pane #gameControlView .topButton,
.copilot-root .inspect-pane #gamePerformanceView .topButton,
.copilot-root .inspect-pane .codeEditorTools .topButton,
.copilot-root .inspect-pane .codeEditorTools button,
.copilot-root .inspect-pane .gameControlDrawDetialTop button {
    height: auto !important;
    min-height: 26px;
    padding: 4px 10px !important;
    margin: 0 !important;
    background: var(--modal-surface-2) !important;
    border: 1px solid var(--modal-border) !important;
    color: var(--modal-text) !important;
    border-radius: 5px !important;
    font-family: inherit;
    font-size: 11px !important;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.copilot-root .inspect-pane #codeEditorView .topButton:hover,
.copilot-root .inspect-pane #gameControlView .topButton:hover,
.copilot-root .inspect-pane #gamePerformanceView .topButton:hover,
.copilot-root .inspect-pane .codeEditorTools .topButton:hover,
.copilot-root .inspect-pane .codeEditorTools button:hover,
.copilot-root .inspect-pane .gameControlDrawDetialTop button:hover {
    background: var(--modal-accent) !important;
    border-color: var(--modal-accent-hover) !important;
    color: #fff !important;
}

.copilot-root .inspect-pane #codeEditorDele.topButton:hover,
.copilot-root .inspect-pane .gameControlTools button[style*="red"] {
    background: var(--modal-danger) !important;
    border-color: #f85149 !important;
}

/* ── 确认弹窗 #alertView ── */
.copilot-root .inspect-pane #alertView {
    backdrop-filter: blur(3px);
    background-color: rgba(1, 4, 9, 0.65) !important;
    font-size: 13px !important;
    display: none !important;
}

.copilot-root .inspect-pane #alertView.gi-alert-open {
    display: block !important;
    z-index: 10001 !important;
}

.copilot-root .inspect-pane #alertView .popup {
    background: var(--modal-bg) !important;
    color: var(--modal-text) !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55) !important;
    width: min(440px, 92%) !important;
    max-width: 92% !important;
    min-height: 100px;
    max-height: 90vh;
    padding-bottom: 56px;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.copilot-root #alertView .popup_title {
    margin: 0 !important;
    padding: 14px 40px 14px 16px !important;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--modal-text) !important;
    border-bottom: 1px solid var(--modal-border) !important;
    background: var(--modal-surface);
    border-radius: 10px 10px 0 0;
}

.copilot-root #alertView .popup_close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--modal-border);
    border-radius: 6px;
    background: var(--modal-surface-2);
    color: var(--modal-text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.copilot-root #alertView .popup_close:hover {
    background: var(--modal-accent);
    border-color: var(--modal-accent-hover);
    color: #fff;
}

.copilot-root #alertView .popup_content {
    padding: 14px 16px !important;
    color: var(--modal-text-muted);
    font-size: 12px;
    line-height: 1.6;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.copilot-root #alertView .popup_content::-webkit-scrollbar {
    width: 8px;
}

.copilot-root #alertView .popup_content::-webkit-scrollbar-thumb {
    background: #484f58;
    border-radius: 4px;
}

.copilot-root #alertView .popup_content::-webkit-scrollbar-track {
    background: transparent;
}

.copilot-root #alertView .popup_btn {
    position: absolute;
    bottom: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px 12px;
    gap: 8px;
    box-sizing: border-box;
    background: var(--modal-surface);
    border-top: 1px solid var(--modal-border);
    border-radius: 0 0 10px 10px;
    display: flex;
}

.copilot-root #alertView .popup_btn button {
    flex: 1;
    height: 34px !important;
    margin: 0 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.copilot-root #alertView .confirmBtn {
    background: var(--modal-accent) !important;
    border: 1px solid var(--modal-accent-hover) !important;
    color: #fff !important;
}

.copilot-root #alertView .confirmBtn:hover {
    background: var(--modal-accent-hover) !important;
}

.copilot-root #alertView .cancelBtn {
    background: var(--modal-surface-2) !important;
    border: 1px solid var(--modal-border) !important;
    color: var(--modal-text) !important;
}

.copilot-root #alertView .cancelBtn:hover {
    background: #30363d !important;
    border-color: #484f58 !important;
}

/* ── 说明 / 支持 弹窗内容 ── */
.copilot-root #alertView .readMeEngineName {
    color: #79c0ff !important;
}

.copilot-root #alertView .readMeEngineDes {
    color: #ffa657 !important;
}

.copilot-root #alertView .readMeQQ {
    color: #a371f7 !important;
}

.copilot-root #alertView .readMeLink {
    color: var(--modal-link) !important;
    border-bottom-color: rgba(88, 166, 255, 0.4) !important;
    cursor: pointer;
}

.copilot-root #alertView .readMeLink:hover {
    color: #79c0ff !important;
}

/* 更新提示：商店链接用更浅的蓝色，避免深色背景下难辨认 */
.copilot-root #alertView .copilot-update-store-link,
.copilot-root #alertView .copilot-update-check a {
    color: #8ec8ff !important;
    border-bottom-color: rgba(142, 200, 255, 0.45) !important;
}

.copilot-root #alertView .copilot-update-store-link:hover,
.copilot-root #alertView .copilot-update-check a:hover {
    color: #b4dcff !important;
}

.copilot-root #alertView .privacyDes {
    color: var(--modal-text-muted) !important;
    font-size: 11px !important;
}

.copilot-root #alertView .supportImg {
    border-radius: 6px;
    max-width: 100%;
}

.copilot-root #alertView .versionIngore {
    color: var(--modal-text-muted) !important;
}

.copilot-root #alertView .versionDes {
    color: #ffa657 !important;
}

.copilot-root #alertView .currentVersion {
    color: #f97583 !important;
}

/* ── Copilot 自定义「说明」弹窗 ── */
.copilot-root #alertView .copilot-readme {
    font-size: 12px;
    line-height: 1.65;
    color: var(--modal-text-muted);
}

.copilot-root #alertView .copilot-readme-intro {
    margin: 0 0 12px;
    color: var(--modal-text);
}

.copilot-root #alertView .copilot-readme-heading {
    margin: 12px 0 6px;
    font-weight: 600;
    color: var(--modal-text);
    font-size: 12px;
}

.copilot-root #alertView .copilot-readme-engines,
.copilot-root #alertView .copilot-readme-features {
    margin: 0 0 8px;
    padding-left: 18px;
}

.copilot-root #alertView .copilot-readme-engines li,
.copilot-root #alertView .copilot-readme-features li {
    margin-bottom: 4px;
}

.copilot-root #alertView .copilot-readme-meta {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--modal-text-muted);
}

.copilot-root #alertView .copilot-readme-links {
    margin: 8px 0 0;
    font-size: 11px;
}

.copilot-root #alertView .copilot-readme-donate {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--modal-border, rgba(48, 54, 61, 0.5));
    text-align: center;
}

.copilot-root #alertView .copilot-readme-donate-title {
    margin-top: 0;
}

.copilot-root #alertView .copilot-readme-donate-qr {
    display: block;
    width: 140px;
    height: 140px;
    margin: 8px auto 6px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 4px;
    box-sizing: border-box;
}

.copilot-root #alertView .copilot-readme-donate-caption {
    margin: 0;
    font-size: 11px;
    color: var(--modal-text-muted);
}

/* ── 顶部 Toast ── */
.copilot-root .inspect-pane .dev-panel > .totast,
.copilot-root .inspect-pane .totast,
body > .totast {
    width: 100%;
    min-height: 32px;
    height: auto !important;
    line-height: 1.5 !important;
    padding: 8px 12px;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(210, 153, 34, 0.92) !important;
    color: #1c1917 !important;
    border-bottom: 1px solid rgba(227, 179, 65, 0.5);
    z-index: 10001;
    font-size: 13px !important;
    font-weight: 500;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ── 右键菜单（功能相关） ── */
.copilot-root .inspect-pane .contextmenu {
    background: var(--modal-surface) !important;
    color: var(--modal-text) !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    font-family: inherit;
    font-size: 12px;
}

.copilot-root .inspect-pane .contextmenu li:hover {
    background: var(--modal-surface-2) !important;
    border-left-color: var(--modal-accent) !important;
}

/* ── 骨骼资源面板 ── */
.copilot-root .inspect-pane #skeletonAssetView {
    background: var(--modal-bg) !important;
    color: var(--modal-text) !important;
    border: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
}

.copilot-root .inspect-pane #skeletonAssetView.gi-panel-open:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

.copilot-root .inspect-pane #skeletonAssetView[hidden] {
    display: none !important;
}

.copilot-root .inspect-pane .skeletonAssetTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--modal-border);
    background: var(--modal-surface);
}

.copilot-root .inspect-pane .skeletonAssetTitle {
    font-weight: 600;
    color: var(--modal-text);
}

.copilot-root .inspect-pane .skeletonAssetTitleRight button {
    margin-left: 6px;
    min-width: 28px;
    padding: 2px 8px;
    border: 1px solid var(--modal-border);
    background: var(--modal-surface-2);
    color: var(--modal-text);
    border-radius: 4px;
    cursor: pointer;
}

.copilot-root .inspect-pane .skeletonAssetToolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--modal-border);
}

.copilot-root .inspect-pane .skeletonAssetBody {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
    overflow: hidden;
}

.copilot-root .inspect-pane .skeletonAssetList {
    list-style: none;
    margin: 0;
    padding: 6px;
    overflow: auto;
    border-right: 1px solid var(--modal-border);
}

.copilot-root .inspect-pane .skeletonAsset-item {
    padding: 8px 10px;
    margin-bottom: 4px;
    border: 1px solid var(--modal-border);
    border-radius: 6px;
    cursor: pointer;
    background: var(--modal-surface);
}

.copilot-root .inspect-pane .skeletonAsset-item.is-active {
    border-color: var(--modal-accent);
    background: var(--modal-surface-2);
}

.copilot-root .inspect-pane .skeletonAsset-item.is-disabled {
    opacity: 0.55;
}

.copilot-root .inspect-pane .skeletonAsset-item__head {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}

.copilot-root .inspect-pane .skeletonAsset-item__kind {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #30363d;
    color: #8b949e;
}

.copilot-root .inspect-pane .skeletonAsset-item__src {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(56, 139, 253, 0.15);
    color: #58a6ff;
}

.copilot-root .inspect-pane .skeletonAsset-item__name {
    font-weight: 600;
    color: var(--modal-text);
}

.copilot-root .inspect-pane .skeletonAsset-item__path,
.copilot-root .inspect-pane .skeletonAsset-item__tex,
.copilot-root .inspect-pane .skeletonAsset-item__reason {
    font-size: 11px;
    color: var(--modal-text-muted);
}

.copilot-root .inspect-pane .skeletonAsset-item__reason {
    color: #d29922;
}

.copilot-root .inspect-pane .skeletonAssetDetail {
    padding: 10px 12px;
    overflow: auto;
}

.copilot-root .inspect-pane .skeletonAsset-detail-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.copilot-root .inspect-pane .skeletonAsset-detail-row > span:first-child {
    color: var(--modal-text-muted);
    min-width: 48px;
}

.copilot-root .inspect-pane .skeletonAsset-detail-warn {
    margin-top: 8px;
    padding: 8px;
    border-radius: 4px;
    background: rgba(218, 54, 51, 0.12);
    color: #f85149;
    font-size: 11px;
}

.copilot-root .inspect-pane .skeletonAsset-empty,
.copilot-root .inspect-pane .skeletonAsset-detail-empty {
    color: var(--modal-text-muted);
    padding: 12px;
}

.copilot-root .inspect-pane .skeletonAsset-preview-label {
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--modal-text-muted);
}

.copilot-root .inspect-pane .skeletonAsset-preview-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.copilot-root .inspect-pane .skeletonAsset-preview-pause,
.copilot-root .inspect-pane .skeletonAsset-preview-stop {
    padding: 3px 10px;
    border: 1px solid #3d444d;
    border-radius: 4px;
    background: #21262d;
    color: #c9d1d9;
    font-size: 11px;
    cursor: pointer;
}

.copilot-root .inspect-pane .skeletonAsset-preview-pause:hover,
.copilot-root .inspect-pane .skeletonAsset-preview-stop:hover {
    border-color: #58a6ff;
    color: #f0f6fc;
}

.copilot-root .inspect-pane .skeletonAsset-preview-current {
    font-size: 11px;
    color: var(--modal-text-muted);
}

.copilot-root .inspect-pane .skeletonAsset-anims {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.copilot-root .inspect-pane .skeletonAsset-anim-btn {
    padding: 3px 8px;
    border: 1px solid #3d444d;
    border-radius: 4px;
    background: #21262d;
    color: #c9d1d9;
    font-size: 11px;
    cursor: pointer;
}

.copilot-root .inspect-pane .skeletonAsset-anim-btn:hover,
.copilot-root .inspect-pane .skeletonAsset-anim-btn.is-active {
    border-color: #58a6ff;
    color: #f0f6fc;
    background: #30363d;
}

.copilot-root .inspect-pane .cocos-skeleton-export-btn {
    margin-left: 8px;
    font-size: 11px;
    padding: 2px 8px;
}

.copilot-root .inspect-pane .contextmenu li span:hover {
    color: var(--modal-link) !important;
}
