.ytb-jsonfmt-header {
    background: #1976D2;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
}

.ytb-jsonfmt-card {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 8px;
}

.ytb-jsonfmt-textarea {
    width: 100%;
    min-height: 220px;
    margin-top: 8px;
    padding: 12px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.5;
    border: 1px solid #CFD8DC;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}

.ytb-jsonfmt-options {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 14px;
    color: #333;
}
.ytb-jsonfmt-options select {
    margin-left: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #CFD8DC;
}
.ytb-jsonfmt-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ytb-jsonfmt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.ytb-jsonfmt-btn {
    background: #43A047;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ytb-jsonfmt-btn:hover { background: #388E3C; }
.ytb-jsonfmt-btn.secondary {
    background: #ECEFF1;
    color: #263238;
}
.ytb-jsonfmt-btn.secondary:hover { background: #CFD8DC; }

.ytb-jsonfmt-error {
    margin-top: 16px;
    padding: 12px 14px;
    background: #FFEBEE;
    border: 1px solid #FFCDD2;
    color: #C62828;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13.5px;
    white-space: pre-wrap;
}

.ytb-jsonfmt-output {
    margin-top: 16px;
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    padding: 14px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.5;
    max-height: 480px;
    overflow: auto;
    white-space: pre;
}

.ytb-jsonfmt-tree-output {
    margin-top: 16px;
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    padding: 14px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    max-height: 480px;
    overflow: auto;
}
.ytb-jsonfmt-tree-output ul { list-style: none; margin: 0; padding-left: 18px; }
.ytb-jsonfmt-tree-output li { margin: 2px 0; }
.ytb-jsonfmt-tree-toggle {
    cursor: pointer;
    color: #1976D2;
    user-select: none;
    margin-right: 4px;
}
.ytb-jsonfmt-tree-key { color: #6A1B9A; font-weight: 600; }
.ytb-jsonfmt-tree-string { color: #2E7D32; }
.ytb-jsonfmt-tree-number { color: #EF6C00; }
.ytb-jsonfmt-tree-boolean { color: #C62828; }
.ytb-jsonfmt-tree-null { color: #757575; font-style: italic; }

.ytb-jsonfmt-stats {
    margin-top: 12px;
    font-size: 13px;
    color: #616161;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.ytb-jsonfmt-stats span strong { color: #212121; }

@media (max-width: 640px) {
    .ytb-jsonfmt-toolbar { flex-direction: column; }
    .ytb-jsonfmt-btn { width: 100%; }
}
