@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Code Pro', monospace;
    border: 1px solid #E0E0E0;
    font-weight: 400;
    line-height: 1.6;
    color: #31333F;
    background-color: transparent;
    padding: 0;
    overflow: auto;
    white-space: pre-wrap;
}

#root {
    font-family: 'Source Code Pro', monospace;
    background-color: transparent;
    padding: 0;
}

#toon-container {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.865rem;
    background-color: #FFFFFF;
    border-radius: 0.5rem;
    padding: 1rem;
    position: relative;
}

.root-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 1;
    z-index: 10;
}

.root-content {
    padding-left: 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 8px;
}

.toon-line {
    display: flex;
    align-items: center;
    padding: 0px 4px;
    min-height: 20px;
    position: relative;
    width: fit-content;
    min-width: 100%;
}

.toon-line:hover {
    background-color: rgba(151, 166, 195, 0.15);
}

.toon-line:hover .copy-btn {
    opacity: 1;
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    margin-right: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.toggle-icon svg {
    width: 12px;
    height: 12px;
    fill: rgb(88, 110, 117);
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.toggle-placeholder {
    width: 16px;
    margin-right: 4px;
    flex-shrink: 0;
}

.toon-content-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.toon-key {
    color: rgb(0, 43, 54);
    margin-right: 4px;
}

.toon-punctuation {
    color: #31333F;
    margin: 0 4px 0 0;
}

.toon-value {
    color: #31333F;
}

.toon-value.string {
    color: rgb(203, 75, 22);
}

.toon-value.number {
    color: rgb(38, 139, 210);
}

.toon-value.boolean {
    color: rgb(38, 139, 210);
}

.toon-bracket {
    color: #31333F;
    font-weight: bold;
}

.toon-index {
    color: rgb(0, 43, 54);
    margin-right: 4px;
}

.copy-btn {
    opacity: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    margin-left: 8px;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
    display: inline;
    align-items: center;
    width: 16px;
    height: 16px;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
    display: inline;
    fill: rgb(88, 110, 117);
}

.copy-btn:hover {
    opacity: 1 !important;
}

.copy-btn.copied svg {
    fill: #00B050;
}

.toon-children {
    margin-left: 20px;
    padding-left: 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.toon-children.collapsed {
    display: none;
}

.empty-message {
    color: #808495;
    font-style: italic;
    margin-left: 20px;
}