body {
    font-family: system-ui, -apple-system, sans-serif;
    max-width: 95%;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    display: flex;
    gap: 1rem;
    height: 60vh;
}

textarea {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: monospace;
    resize: none;
    /* Fix for long minified JSON */
    white-space: pre-wrap;
    word-break: break-all;
    overflow: auto;
}

/* Ensure the code block also wraps if needed */
pre {
    white-space: pre-wrap;
    word-break: break-word;
    /* Critical for scrolling */
    height: 100%;
    overflow: auto;
}

code {
    /* Ensure code block takes full height to allow scrolling inside pre */
    min-height: 100%;
    box-sizing: border-box;
}

button {
    padding: 0.8rem 2rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    background: #1d4ed8;
}

.success {
    color: green;
    display: none;
    margin-top: 0.5rem;
}

.error {
    color: red;
    display: none;
    margin-top: 0.5rem;
}

.trust-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Highlight.js Line Numbers */
.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    text-align: right;
    color: #5c6370;
    border-right: 1px solid #5c6370;
    padding-right: 15px !important;
    padding-left: 5px !important;
    vertical-align: top;
    width: 25px;
}

/* Fix for table layout disrupting scroll */
.hljs-ln {
    width: 100%;
    border-collapse: collapse;
}

.hljs-ln td {
    padding-bottom: 0 !important;
    line-height: 1.5;
    white-space: pre-wrap;
    /* Ensure text wrapping matches line numbers */
}