/* --- Wrapper (Matches Stopwatch/Diff Theme) --- */
#cj-wrapper {
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px; /* Wide workspace */
    margin: 0 auto;
    background-color: #111827; /* Gray 900 */
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 2px solid #374151; /* Gray 700 */
    color: white;
    gap: 20px;
}

/* --- Grid Layout --- */
.cj-grid {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.cj-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0; /* Prevent flex overflow */
}

/* --- Text Areas --- */
.cj-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #374151;
    padding-bottom: 5px;
}

.cj-textarea {
    width: 100%;
    background-color: #1f2937; /* Gray 800 */
    border: 1px solid #374151;
    color: #d1d5db; /* Gray 300 */
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.85rem;
    padding: 15px;
    border-radius: 6px;
    height: 300px;
    resize: vertical;
    outline: none;
    line-height: 1.4;
    white-space: pre;
    overflow-x: auto;
    transition: all 0.2s;
}

.cj-textarea:focus {
    border-color: #3b82f6; /* Blue focus */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    color: white;
}

/* --- Metadata/Options --- */
.cj-meta {
    display: flex;
    justify-content: flex-end;
    font-size: 0.7rem;
    color: #6b7280;
    font-family: 'Press Start 2P', monospace, sans-serif;
}

.cj-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* --- Middle Controls --- */
.cj-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    padding-top: 50px; /* Align visually with textareas center */
}

.cj-btn {
    background-color: #374151;
    color: #d1d5db;
    border: none;
    border-radius: 4px;
    padding: 15px 10px;
    font-family: inherit;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 4px 0 rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    width: 140px;
}

.cj-btn:hover {
    background-color: #4b5563;
    color: white;
}

.cj-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

#btn-to-json {
    background-color: #10b981; /* Green */
    color: #064e3b;
    border-bottom: 4px solid #059669;
    box-shadow: 0 4px 0 #047857;
}

#btn-to-csv {
    background-color: #3b82f6; /* Blue */
    color: #1e3a8a;
    border-bottom: 4px solid #2563eb;
    box-shadow: 0 4px 0 #1d4ed8;
}

/* --- Status Bar --- */
.cj-status {
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #111;
    border: 1px solid #374151;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #6b7280;
    text-transform: uppercase;
}

.cj-status.success {
    color: #10b981;
    border-color: #059669;
}

.cj-status.error {
    color: #ef4444;
    border-color: #b91c1c;
}

/* --- Clear Button --- */
.cj-btn-clear {
    width: 100%;
    background-color: #ef4444;
    color: #7f1d1d;
    border: none;
    border-bottom: 4px solid #b91c1c;
    border-radius: 4px;
    padding: 15px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.1s;
}

.cj-btn-clear:active {
    transform: translateY(4px);
    border-bottom: none;
    margin-bottom: 4px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .cj-grid {
        flex-direction: column;
    }

    .cj-controls {
        flex-direction: row;
        width: 100%;
        padding-top: 0;
    }

    .cj-btn {
        flex: 1;
    }
}