:root {
    --bg-start: #fbfbfd;
    --bg-end: #eef2f6;
    --panel: rgba(255, 255, 255, 0.78);
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(15, 23, 42, 0.14);
    --text: #111827;
    --muted: #667085;
    --error: #c6362f;
    --error-soft: rgba(198, 54, 47, 0.08);
    --warn: #a16207;
    --warn-soft: rgba(217, 119, 6, 0.10);
    --success: #177245;
    --success-soft: #edf9f1;
    --ai: #165dff;
    --ai-soft: rgba(22, 93, 255, 0.1);
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    height: 100vh;
    font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg-start) 0%, #f4f5f7 48%, var(--bg-end) 100%);
    overflow: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -12rem;
    left: -10rem;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0) 72%);
}

body::after {
    top: 6rem;
    right: -8rem;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0) 72%);
}

code {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: 13px;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1460px;
    margin: 0 auto;
    padding: 36px 24px 56px;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hero {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.hero-kicker,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #98a2b3;
}

.hero-grid,
.workspace {
    display: grid;
    gap: 24px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    align-items: end;
    margin-top: 18px;
}

.hero h1 {
    margin: 14px 0 0;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 600;
}

.hero p,
.card-desc,
.guide-copy,
.empty-copy,
.success-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 15px;
}

.hero p {
    max-width: 720px;
    margin-top: 16px;
    font-size: 16px;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.meta-card,
.card {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(22px);
}

.meta-card {
    padding: 18px;
    border-radius: 22px;
}

.meta-label {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #98a2b3;
}

.meta-value {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.7;
}

.workspace {
    grid-template-columns: minmax(0, 1.12fr) minmax(460px, 1.08fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    margin-top: 0;
    flex: 1;
    min-height: 0;
    height: clamp(560px, calc(100vh - 92px), 920px);
    overflow: hidden;
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    border-radius: 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: translateY(16px);
    opacity: 0;
    animation: card-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.card-header,
.result-body,
.editor-card .card-body {
    padding-left: 28px;
    padding-right: 28px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    min-height: 86px;
    padding-top: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.card-title {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.04em;
    font-weight: 600;
    line-height: 1.2;
}

.title-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-infno-toggle {
    min-height: 38px;
    padding: 8px 16px;
    font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.btn-infno-toggle.is-switchable {
    border-color: rgba(22, 93, 255, 0.2);
    color: #165dff;
}

.btn-infno-toggle:disabled {
    opacity: 1;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.title-ai-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--ai-soft);
    color: var(--ai);
    font-size: 13px;
    line-height: 1;
}

.card-desc {
    margin-top: 10px;
    max-width: 560px;
}

.metrics,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-neutral {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text);
}

.badge-error {
    background: var(--error-soft);
    color: var(--error);
}

.badge-tip {
    background: var(--warn-soft);
    color: var(--warn);
}

.editor-card .card-body {
    display: flex;
    flex: 1;
    min-height: 0;
    padding-top: 22px;
    padding-bottom: 28px;
}

.editor-card form {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.editor-frame {
    position: relative;
    flex: 1;
    min-height: 0;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02) 0%, rgba(255, 255, 255, 0.92) 100%);
    transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.editor-frame:focus-within {
    border-color: rgba(15, 23, 42, 0.22);
    box-shadow: 0 0 0 6px rgba(15, 23, 42, 0.04);
}

.editor-frame.is-highlighted {
    border-color: rgba(198, 54, 47, 0.3);
    box-shadow: 0 0 0 6px rgba(198, 54, 47, 0.08);
}

.editor-frame.is-tree-mode textarea {
    display: none;
}

.json-tree-shell {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    flex-direction: column;
    min-height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.editor-frame.is-tree-mode .json-tree-shell {
    display: flex;
}

.json-tree-shell.is-hidden {
    display: none !important;
}

.json-tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.86);
}

.json-tree-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.json-tree-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.json-tree-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.json-tree-action:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.22);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.json-tree-action-primary {
    border-color: rgba(22, 93, 255, 0.18);
    color: var(--ai);
}

.json-tree-view {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px 0 18px;
    font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: 14px;
    line-height: 1.68;
}

.json-tree-entry {
    position: relative;
}

.json-tree-entry.is-collapsed > .json-tree-line-expanded,
.json-tree-entry.is-collapsed > .json-tree-children,
.json-tree-entry.is-collapsed > .json-tree-line-close {
    display: none;
}

.json-tree-entry:not(.is-collapsed) > .json-tree-line-collapsed {
    display: none;
}

.json-tree-line {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 2px 18px 2px 20px;
    white-space: pre;
}

.json-tree-toggle {
    flex: 0 0 auto;
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin-top: 2px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    line-height: 18px;
    cursor: pointer;
}

.json-tree-toggle:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text);
}

.json-tree-indent {
    flex: 0 0 auto;
}

.json-tree-key,
.json-tree-index {
    color: #b54708;
}

.json-tree-separator,
.json-tree-bracket,
.json-tree-comma {
    color: #475467;
}

.json-tree-value-string {
    color: #165dff;
}

.json-tree-value-number {
    color: #177245;
}

.json-tree-value-boolean {
    color: #7c3aed;
}

.json-tree-value-null {
    color: #c6362f;
}

.json-tree-preview {
    color: #667085;
}

.json-tree-empty {
    color: #667085;
}

textarea {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 560px;
    padding: 18px 20px;
    border: 0;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--text);
    font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: 14px;
    line-height: 1.68;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    overflow: auto;
    tab-size: 2;
}

textarea::placeholder {
    color: #98a2b3;
}

.action-row {
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.2);
}

.btn-ai:hover {
    border-color: rgba(22, 93, 255, 0.4);
    box-shadow: 0 18px 34px rgba(22, 93, 255, 0.24);
}

.btn-primary {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.18);
}

.btn-ai {
    margin-left: auto;
    border-color: rgba(22, 93, 255, 0.28);
    background: #165dff;
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(22, 93, 255, 0.22);
}

.btn-ai:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.04);
}

.is-hidden {
    display: none !important;
}

.status-strip,
#locateHint,
.notice {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
}

.status-strip {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding: 14px 16px;
    font-size: 14px;
}

.status-strip strong,
#locateHint strong {
    font-weight: 600;
}

.status-strip span {
    color: var(--muted);
    line-height: 1.7;
}

#locateHint {
    display: none;
    margin-top: 14px;
    padding: 12px 16px;
    font-size: 14px;
}

.tip-list,
.error-list {
    display: grid;
    gap: 12px;
}

.empty-illustration {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.result-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 28px;
}

#resultCard {
    min-height: 0;
}

#resultCard .result-body {
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.result-header {
    align-items: center;
}

.result-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
}

.result-tab {
    border: 0;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.result-tab.is-active {
    background: #111827;
    color: #ffffff;
}

.result-tab-ai.is-active {
    background: var(--ai);
    color: #ffffff;
}

.result-panel {
    display: none;
}

.result-panel.is-active {
    display: block;
    flex: 1;
    min-height: 0;
}

.ai-result-wrap {
    display: grid;
    gap: 12px;
}

.ai-card {
    border-radius: 18px;
    border: 1px solid var(--line);
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(22, 93, 255, 0.08) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.ai-card-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.ai-dot-critical {
    background: #c6362f;
}

.ai-dot-warning {
    background: #a16207;
}

.ai-dot-normal {
    background: #177245;
}

.ai-dot-summary {
    background: #165dff;
}

.ai-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    font-size: 14px;
    line-height: 1.65;
}

.ai-empty {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    padding: 18px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.ai-loading {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    padding: 26px 20px;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 15px;
}

.ai-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(22, 93, 255, 0.2);
    border-top-color: #165dff;
    animation: ai-spin 0.9s linear infinite;
}

@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

.section-label {
    margin: 22px 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #98a2b3;
}

.tip-item,
.error-item {
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    animation: item-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.tip-item {
    display: block;
    padding: 16px 18px;
    color: #8a5b10;
    border-color: rgba(217, 119, 6, 0.16);
    background: linear-gradient(180deg, rgba(255, 250, 235, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.tip-content {
    flex: 1;
    min-width: 0;
}

.tip-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.tip-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--warn);
}

.tip-index,
.error-index {
    min-width: 28px;
    font-size: 13px;
    color: #98a2b3;
}

.tip-param {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.1);
    color: #8a5b10;
    font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: 12px;
}

.tip-grid {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 6px 10px;
    font-size: 14px;
}

.tip-grid .label {
    color: #98a2b3;
}

.tip-grid .value {
    color: var(--text);
    word-break: break-all;
}

.tip-grid .reason {
    color: #8a5b10;
    font-weight: 500;
}

.tip-item-group {
    display: block;
    cursor: default;
}

.tip-head-group {
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.tip-head-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tip-group-count {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.08);
    color: #a16207;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tip-grid-group {
    margin-bottom: 0;
}

.tip-group-toggle {
    flex-shrink: 0;
    min-width: 68px;
    padding: 7px 12px;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #a16207;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tip-group-toggle:hover {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.3);
}

.tip-group-panel {
    margin-top: 14px;
}

.tip-group-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(217, 119, 6, 0.12);
    background: rgba(255, 255, 255, 0.76);
}

.tip-group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.tip-group-table th,
.tip-group-td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(217, 119, 6, 0.08);
}

.tip-group-table th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #98a2b3;
    background: rgba(217, 119, 6, 0.04);
}

.tip-group-table tbody tr:last-child .tip-group-td {
    border-bottom: 0;
}

.error-item {
    cursor: pointer;
    padding: 16px 18px;
    border-color: rgba(198, 54, 47, 0.16);
    background: linear-gradient(180deg, rgba(255, 247, 246, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.error-item:hover {
    transform: translateY(-2px);
    border-color: rgba(198, 54, 47, 0.28);
    box-shadow: 0 18px 40px rgba(198, 54, 47, 0.08);
}

.error-item-group {
    cursor: default;
}

.error-item-group:hover {
    transform: none;
}

.error-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.error-index {
    color: #98a2b3;
}

.error-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--error);
}

.error-param {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(198, 54, 47, 0.1);
    color: #8b1e1b;
    font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
    font-size: 12px;
}

.error-head-group {
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.error-head-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.error-group-count {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(198, 54, 47, 0.08);
    color: #b42318;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.error-grid {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 6px 10px;
    font-size: 14px;
}

.error-grid .label {
    color: #98a2b3;
}

.error-grid .value {
    color: var(--text);
    word-break: break-all;
}

.error-grid .reason {
    color: #8b1e1b;
    font-weight: 500;
}

.error-grid-group {
    margin-bottom: 0;
}

.error-group-toggle {
    flex-shrink: 0;
    min-width: 68px;
    padding: 7px 12px;
    border: 1px solid rgba(198, 54, 47, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.error-group-toggle:hover {
    background: rgba(198, 54, 47, 0.08);
    border-color: rgba(198, 54, 47, 0.3);
}

.error-group-panel {
    margin-top: 14px;
}

.error-group-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(198, 54, 47, 0.12);
    background: rgba(255, 255, 255, 0.76);
}

.error-group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.error-group-table th,
.error-group-td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(198, 54, 47, 0.08);
}

.error-group-table th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #98a2b3;
    background: rgba(198, 54, 47, 0.04);
}

.error-group-table tbody tr:last-child .error-group-td {
    border-bottom: 0;
}

.error-group-table-row {
    cursor: pointer;
    transition: background 0.18s ease;
}

.error-group-table-row:hover .error-group-td {
    background: rgba(22, 93, 255, 0.05);
}

.error-group-td code {
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(198, 54, 47, 0.08);
    color: #8b1e1b;
}

.empty-state,
.result-success {
    display: grid;
    gap: 16px;
}

.empty-state-centered {
    min-height: 100%;
    place-content: center;
    justify-items: center;
    text-align: center;
}

.empty-illustration {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
}

.empty-state h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.04em;
    font-weight: 600;
}

/* 校验通过横幅 */
.success-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0faf4 0%, #e6f7ed 100%);
    border: 1px solid rgba(23, 114, 69, 0.16);
}

.success-icon-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #177245;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px rgba(23, 114, 69, 0.28);
}

.success-icon-wrap svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}

.success-title {
    font-size: 18px;
    font-weight: 650;
    color: #115e3a;
    letter-spacing: -0.02em;
}

.success-sub {
    margin-top: 3px;
    font-size: 13.5px;
    color: #2d8a5e;
    line-height: 1.5;
}

/* 项目清单表格 */
.hilist-table-wrap {
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.hilist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hilist-th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.03);
    border-bottom: 1px solid var(--line);
    transition: color 0.15s ease, background 0.15s ease;
}

.hilist-th-seq {
    width: 40px;
    text-align: center;
}

.hilist-th-name,
.hilist-th-code,
.hilist-th-type {
    cursor: pointer;
}

.hilist-th-name:hover,
.hilist-th-code:hover,
.hilist-th-type:hover {
    color: #165dff;
    background: rgba(22, 93, 255, 0.07);
}

.basic-info-th,
.basic-info-key {
    width: 120px;
    white-space: nowrap;
}

.hilist-tr:not(:last-child) .hilist-td {
    border-bottom: 1px solid var(--line);
}

.hilist-tr-clickable {
    cursor: pointer;
}

.hilist-tr:hover .hilist-td,
.hilist-tr-clickable:hover .hilist-td {
    background: rgba(22, 93, 255, 0.04);
}

.hilist-td {
    padding: 10px 14px;
    vertical-align: middle;
    color: var(--text);
    transition: background 0.15s;
}

.hilist-td-seq {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.hilist-td-seq-copy {
    cursor: pointer;
}

.hilist-seq-link {
    min-width: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: center;
    transition: color 0.15s ease;
}

.hilist-td-seq-copy:hover,
.hilist-td-seq-copy:hover .hilist-seq-link,
.hilist-seq-link:hover {
    color: #165dff;
}

.hilist-td-name {
    font-weight: 500;
}

.hilist-td-type {
    white-space: nowrap;
}

.hilist-link,
.hilist-code-link {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.hilist-link:hover {
    color: #165dff;
}

.hilist-code-link code {
    pointer-events: none;
}

.hilist-td-type .hilist-link {
    color: var(--muted);
}

.hilist-td-type .hilist-link:hover {
    color: #165dff;
}

.hilist-query-row .hilist-td {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(22, 93, 255, 0.04) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.hilist-query-cell {
    text-align: center;
}

.hilist-external-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(22, 93, 255, 0.14);
    background: rgba(22, 93, 255, 0.07);
    color: #165dff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    margin: 0 auto;
}

.hilist-external-link:hover {
    background: rgba(22, 93, 255, 0.12);
    border-color: rgba(22, 93, 255, 0.22);
    transform: translateY(-1px);
}

.hilist-td-code code {
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(22, 93, 255, 0.07);
    color: #165dff;
    border: 1px solid rgba(22, 93, 255, 0.12);
}

.notice {
    position: fixed;
    top: 28px;
    left: calc(50% - 120px);
    width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    transform: translate(-50%, -18px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
    z-index: 10;
    text-align: center;
    font-size: 14px;
}

.notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.notice[data-type="error"] {
    border-color: rgba(198, 54, 47, 0.18);
    background: rgba(255, 248, 247, 0.95);
}

.notice[data-type="success"] {
    border-color: rgba(23, 114, 69, 0.18);
    background: rgba(247, 255, 250, 0.95);
}

.error-item:nth-child(2),
.tip-item:nth-child(2) { animation-delay: 0.04s; }
.error-item:nth-child(3),
.tip-item:nth-child(3) { animation-delay: 0.08s; }
.error-item:nth-child(4),
.tip-item:nth-child(4) { animation-delay: 0.12s; }
.error-item:nth-child(5),
.tip-item:nth-child(5) { animation-delay: 0.16s; }

@media (max-width: 1080px) {
    body {
        overflow: hidden;
    }

    .page {
        overflow: hidden;
    }

    .workspace {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        height: auto;
        min-height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .btn-primary {
        margin-left: 0;
    }

    .btn-ai {
        margin-left: 0;
    }

    .card {
        height: auto;
    }
}

@media (max-width: 720px) {
    .page {
        padding: 24px 16px 40px;
    }

    .card-header,
    .result-body,
    .editor-card .card-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .json-tree-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .json-tree-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .action-row .btn,
    .action-row label {
        width: 100%;
    }

    .action-row .btn-primary {
        grid-column: 1 / -1;
    }

    .action-row .btn-ai {
        grid-column: 1 / -1;
        margin-left: 0;
    }

    .result-header {
        align-items: flex-start;
    }

    .result-tabs {
        width: 100%;
        justify-content: space-between;
    }

    textarea {
        min-height: 420px;
    }

    .error-grid,
    .tip-grid {
        grid-template-columns: 1fr;
    }

    .notice {
        left: 50%;
    }

    #resultCard {
        height: auto !important;
    }
}

@keyframes card-in {
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes item-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
